There was a task to write some code that will do something with the Mysql database. Difficulty in setting options for g ++.
At the moment, the options are:
g++ -I/usr/include/mysql++ -I/usr/include/mysql Ways are right, but the project does not want to assemble normally.
----------Build Started-------- /bin/sh -c '"make" -j 2 -f "MHC_wsp.mk"' ----------Building project:[ Myhobby - Debug ]---------- make[1]: Вход в каталог '/home/kost/.codelite/MHC' g++ -c "/home/kost/.codelite/MHC/main.cpp" -g -I/usr/include/mysql++ -I/usr/include/mysql -o ./Debug/main.o "-I." "-I." /home/kost/.codelite/MHC/main.cpp:1:19: warning: extra tokens at end of #include directive /home/kost/.codelite/MHC/main.cpp:2:19: warning: extra tokens at end of #include directive /home/kost/.codelite/MHC/main.cpp:3:20: warning: extra tokens at end of #include directive /home/kost/.codelite/MHC/main.cpp: In function 'int main()': /home/kost/.codelite/MHC/main.cpp:63:19: warning: deprecated conversion from string constant to 'char*' /home/kost/.codelite/MHC/main.cpp:64:17: warning: deprecated conversion from string constant to 'char*' /home/kost/.codelite/MHC/main.cpp:65:21: warning: deprecated conversion from string constant to 'char*' /home/kost/.codelite/MHC/main.cpp:66:21: warning: deprecated conversion from string constant to 'char*' /home/kost/.codelite/MHC/main.cpp:72:56: warning: deprecated conversion from string constant to 'char*' g++ -o ./Debug/Myhobby ./Debug/main.o "-L." ./Debug/main.o: In function 'mysql_connection_setup(connection_details)': /home/kost/.codelite/MHC/main.cpp:24: undefined reference to 'mysql_init' /home/kost/.codelite/MHC/main.cpp:27: undefined reference to 'mysql_real_connect' /home/kost/.codelite/MHC/main.cpp:28: undefined reference to 'mysql_error' ./Debug/main.o: In function 'mysql_perform_query(st_mysql*, char*)': /home/kost/.codelite/MHC/main.cpp:41: undefined reference to 'mysql_query' /home/kost/.codelite/MHC/main.cpp:43: undefined reference to 'mysql_error' /home/kost/.codelite/MHC/main.cpp:47: undefined reference to 'mysql_use_result' ./Debug/main.o: In function 'main': /home/kost/.codelite/MHC/main.cpp:79: undefined reference to 'mysql_fetch_row' /home/kost/.codelite/MHC/main.cpp:83: undefined reference to 'mysql_free_result' /home/kost/.codelite/MHC/main.cpp:85: undefined reference to 'mysql_close' collect2: ld returned 1 exit status make[1]: *** [Debug/Myhobby] Ошибка 1 make[1]: Выход из каталога '/home/kost/.codelite/MHC' make: *** [All] Ошибка 2 ----------Build Ended---------- 9 errors, 8 warnings
While for me it is completely incomprehensible why.
PS rights to /usr/include/mysql (mysql++) = 777
PPS - Actually, the problem is that the compiler does not see links to the necessary objects: (