Talk:Bugs:Reporting GCC Bugs

From openSUSE

Errors Compiling C with MySQL header

Using Suse 10.1R2

Included mysql.h in header.

/#include "/usr/include/mysql/mysql.h"

Kept getting:

(.text+0x1ff): undefined reference to `mysql_init'

(.text+0x238): undefined reference to `mysql_real_connect'

(.text+0x28e): undefined reference to `mysql_get_server_info'

Seems C compiler is looking in: /usr/local/mysql/include and /usr/local/mysql/lib

When I added the following to my MakeFile it worked:

   -I/usr/include/mysql/ -L/usr/lib/mysql -lmysqlclient