I am trying to compile the following:
#include <stdio.h>
#include <stdlib.h>
#include <my_global.h>
#include <mysql.h>
int main(void) {
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
printf("MySQL client version: %s\n", mysql_get_client_info());
return EXIT_SUCCESS;
}
However, Eclipse is giving the following error messaage:
Building target: TestConsole4
Invoking: GCC C Linker
gcc -L/usr/include -L/usr/include/mysql -o "TestConsole4" ./src/TestConsole4.o
./src/TestConsole4.o: In function main':
/home/hearme/workspace/TestConsole4/Debug/../src/TestConsole4.c:19: undefined reference tomysql_get_client_info'
collect2: ld returned 1 exit status
make: *** [TestConsole4] Error 1
I have been going around in circles trying to fix this, any ideas?
Thanks