Problem using MySQL libraries

Hi all people!!! I'm new in C++ programming, and I'm working in a project to access to a database in a MySQL 5.1 server. I installed wxDev C++, then installed mysql libraries, and I made a very simple program, to test the basics of DB access. I have in project options yet configured the use of libmysql.a to the linker, and the include and lib paths. This is the code:

----------------------------------------------
#include <cstdlib>
#include <iostream>
#include <mysql.h>

using namespace std;

int main(int argc, char *argv[])
{
MYSQL *myDB;
myDB=mysql_init(NULL);
mysql_close(myDB);
return EXIT_SUCCESS;
}
----------------------------------------------

The code is compiled without problems, but when I run it, a message 'libmysql.dll not found' appears. I copied libmysql.dll from dll directory to windows\system32, and to lib directory, and to app directory, but the problem is still there. I supose that this will be a silly problem, but please understand that I'm a beginner with the use of dlls. Thanks for the help!!!
Why do you have libmysql.a and libmysql.dll ?

You should link with libmysql.lib
I will try it, but I think that wxDev don't support .lib. Thank you.
I link only with libmysql.lib, but the message still appears. Any idea? Thank you...
Possible you link with debug library and run with release.

Try to install MySQL 5.5.25a from official site (mysql.com) with C Connector 6.0.2.
C Connector 6.0.2 will have "lib" folder with debug, opt subfolder.

Use libmysql.dll, libmysql.lib pair with selected library.
Topic archived. No new replies allowed.