News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How to install mysql?

Started by Maialen, May 19, 2016, 12:24:09 PM

Previous topic - Next topic

Maialen

Hello.
I'm new with codeblock, and still costs me set up new things for me. I take hours trying to put a database with mysql, but I can not integrate with the environment.
I'm using wxWidgets with MinGW-w64 on Windows.
I followed all the tutorials / tips that I've found, but something I'm not doing well. Commented a bit of what I've done to someone can help me.


  • Download MySql conector: https://dev.mysql.com/downloads/connector/c/ (mysql-connector-c-6.1.6-winx64.zip)
  • Download MysQl Aux whith: libmysql.a and libmysql.lib
  • Put the content of conector/include on: C:\minGW-w64\mingw64\mysql
  • Copy libmysql.a to C:\minGW-w64\mingw64\lib
  • Copy libmysql.lib to System32 and SysWOW64 

After on Settings->Compiler->linker settings->Other linker options '-lmysql'

I also try from http://forums.next.codeblocks.org/index.php?topic=9236.0 but not work.

I can include #include <mysql.h> and compile.
But when I try the following code:

    MYSQL *connect;
    connect = mysql_init(NULL);

It can not compile, compilers said:
|undefined reference to `mysql_init'|


I am very confused and do not know how do it.

Help please.

Thank you very much