News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

compiling my application that uses mysql.h

Started by Rakan, May 31, 2008, 03:29:28 PM

Previous topic - Next topic

Rakan

Hello,

i am trying to compile my application which is using mysql.h but when linking, i get undefined reference to mysql_init error.
i added the /usr/lib and usr/local/lib to search directories for linkier on codeblocks but same result

What should i do to enable successfull linking?

thanks,
Rakan

Jenna

It's not enough to add the search-dirs, you also have to add the library itself to "Linker Settings  -> Link Libraries" (without the leading "lib" and without the extension).

It should be "mysqlclient" in your case .