I have installed ta-lib in my ubuntu 14.04 as mentioned in the official documentation
extract tar.gz
./configure
./make
./make install
It installed ta-lib in /usr/local/include/ta-lib
. I then added the header to talib alone #include <ta-lib/ta_libc.h>
and compiled the code without error. but when I added the ta-lib sample codes
#include <ta-lib/ta_libc.h>
TA_RetCode retCode;
retCode = TA_Initialize( );
if( retCode != TA_SUCCESS )
printf( "Cannot initialize TA-Lib (%d)!\n", retCode );
else
{
printf( "TA-Lib correctly initialized.\n" );
/* ... other TA-Lib functions can be used here. */
TA_Shutdown();
}
it gave an undefined error which I know was due to linking problem in codeblocks. So I manually added ta-lib
in project>build options> linker settings>link libraries
and -lta-lib
to other linker options
but now its giving this error
/usr/bin/ld: cannot find -lta-lib