News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

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 .