TulipCharts / tulipindicators

Technical Analysis Indicator Function Library in C
https://tulipindicators.org/
GNU Lesser General Public License v3.0
818 stars 154 forks source link

Improve compatibility with C++ #89

Closed yageek closed 5 years ago

yageek commented 5 years ago

Using the "amalgamate" inside a c++ project triggers the following warning for every ti_indicator_info declared in the file:

 warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]

Declaring the string as const char* instead of char* fixes the warnings.

codeplea commented 5 years ago

Nice. I can't think of any reason not to do this.

That said, why are you compiling as C++? I would recommend the C library be compiled as C, if possible. I'm actually a little surprised that the whole thing worked as C++.