my cpp program worked fine in terminal , gave output also.it run using:
g++ cipher.cpp -lmysqlcppconn but when tried same in eclipse showing below error?
12:07:07 **** incremental build of configuration debug project cipher **** make building file: ../src/cipher.cpp invoking: gcc c++ compiler g++ -i../usr/include/cppconn -i../usr/include -i/usr/include /boost -o0 -g3 -wall -c -fmessage-length=0 -lmysqlcppconn -lmysqlclient -mmd -mp -mf"src/cipher.d" -mt"src/cipher.d" -o "src/cipher.o" "../src/cipher.cpp" /root/downloads/cipher/debug/../src/cipher.cpp:528: undefined reference `sql::mysql::get_driver_instance()' collect2: ld returned 1 exit status make: *** [cipher] error 1 11:54:39 build finished (took 472ms) the program header portion includes
#include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/resultset.h> #include <cppconn/statement.h> #include "mysql_driver.h" #include "mysql_connection.h" using namespace sql::mysql;
the options -lmysqlcppconn , -lmysqlclient included in project->properties->c/c++build->settings->miscalleneous->other flags
eclipse ide version: luna service release 2 (4.4.2)
what "includes" , "libraries" specified in eclipse "path , symbols"?
i have gone through answers of similar queries didnt helped me.
i working on centos6.6
Comments
Post a Comment