User forums > Help

How to install mysql?

(1/1)

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.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



BlueHazzard:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Navigation

[0] Message Index

Go to full version