Comments - Install instructions

10 years, 1 month ago Vladislav Vaintroub

Would it be possible to provide more information of what you're trying to do?

E.g "I installed MariaDB (using MSI distribtion) and I'm trying to write a client application that is using MySQL C API to connect to local MariaDB server. I need to provide path for header files and libraries in Code::Blocks IDE".. Is this description accurate?I could have completely misunderstood the problem.

10 years, 1 month ago David Andersson

Sorry. Actualy the question was where to put the files but I got it now.

Ok, it is scary how accurate your guess was, (for another question that came up)!

So, I installed MariaDB (msi version). I'm trying to write a client program that is using MariaDB Client Library for C 1.0 to connect to a local mariaDB server. In Code::Blocks 12.11 I have provided a path for header and libraries through "Settings->Compiler..->Search directories->compiler respectively linker tab".

Also the path to the .lib files through "Project->Build Option...". Still I get an error message when building that says:

"||=== test, Release ===|
C:\libs\mariadb_client-1.0.0-win64\mariadbclient\include\my_global.h|300|warning: "my_reinterpret_cast" redefined [enabled by default]|
C:\libs\mariadb_client-1.0.0-win64\mariadbclient\include\config-win.h|227|note: this is the location of the previous definition|
C:\MinaProgram\CodeBlocks\projekt\test\main.c||In function 'main':|
C:\MinaProgram\CodeBlocks\projekt\test\main.c|15|warning: implicit declaration of function 'mysql_library_init' [-Wimplicit-function-declaration]|
C:\MinaProgram\CodeBlocks\projekt\test\main.c|36|warning: implicit declaration of function 'mysql_library_end' [-Wimplicit-function-declaration]|
C:\MinaProgram\CodeBlocks\projekt\test\main.c|12|warning: unused variable 'row' [-Wunused-variable]|
obj\Release\main.o:main.c:(.text.startup+0x32)||undefined reference to `mysql_library_init'|
obj\Release\main.o:main.c:(.text.startup+0x54)||undefined reference to `mysql_init@4'|
obj\Release\main.o:main.c:(.text.startup+0x95)||undefined reference to `mysql_real_connect@32'|
obj\Release\main.o:main.c:(.text.startup+0xb4)||undefined reference to `mysql_real_query@12'|
obj\Release\main.o:main.c:(.text.startup+0xeb)||undefined reference to `mysql_close@4'|
obj\Release\main.o:main.c:(.text.startup+0xf1)||undefined reference to `mysql_library_end'|
||=== Build finished: 6 errors, 4 warnings (0 minutes, 0 seconds) ===|
10 years, 1 month ago Vladislav Vaintroub

Project->Build Options>Linker Settings. Add full path to the stub library for the DLL (I unpacked into C:\temp, so for me, the full path is C:\Temp\mariadb_client-1.0.0-win32\lib\libmariadb.lib)

it looks like mysql_library_init and mysql_library_end are not declared in the mysql.h header file. I created a bug about it (

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.