MySQL C API compilation error, crtdbg.h not found -


I am creating a basic program that uses mysql api, I am on windows, my compiler and eclipse CDT As I am using Mingav as my IDE, I have said that paths in mysql are included and the lib path in mysqlclient.lib file is included. However, I get this error:

D: \ Programs \ MinGW \ include \ mysql / my_dbug.h: 108: 20: Fatal error: crtdbg.h: no such file or directory

This is my code:

  #include & lt; Stdio.h & gt; # Include & lt; My_global.h & gt; # Include & lt; Mysql.h & gt; Int main (int argc, char * argv []) {printf ("hello world"); Return 0; }   

If anyone is not able to help me with that problem, can anyone tell me that between using mysqlclient.lib and libmysql.lib / libmysql.dll What is the difference?

Cheers

I am afraid that there is no crtdbg.h in minigu distribution. I think that on Windows, this header comes with Microsoft compiler. I believe that you can use Siegwin instead of Microsoft's compiler, because compiling MyScall on Windows is only possible with Sigwin or Microsoft's compiler (Minzweg is not supported), so Sigwin is in theory your program Should be able to compile

You can install Microsoft's compiler as well by installing Windows SDKs.

If someone is not able to exclude me from that problem, can anyone tell me what is the difference between using mysqlclient.lib and libmysql.lib / libmysql.dll ? / blockquote>

mysqlclient.lib should be static library and libmysql.lib / libmysql.dll is the dynamic library.

Note: If you want to use a static library with Microsoft's compiler, you should compile the same compiler (and with the same version) as a program . You can find more information about the collection of windows. View the previous section MySQL client compile on Microsoft Windows

UPDATE : Using Microsoft's compiler, you can compile the code using the following code :

  cl mysource.c / ic: \ path \ in mysql \ / directory / link / LIBPATH: c: \ path \ MySql \ Lib \ directory / default: LIBYSQL    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -