A:

The problem is that only MS Visual C++ can link libmysql.lib but there is a trick
to compile with Dev c++(I used version 4.9.9.2) or GCC:

> reimp.exe <FULL_PATH_OF(MySQL\lib\opt)>libmysql.lib
(^ This command creates: libmysql.def AND libmysql.a)

> dlltool.exe –input-def LIBMYSQL.def –dllname libmysql.dll –output-lib libmysql.dll
(^ this creates libmysql.dll)

Now You must copy libmysql.a in the “LIB” folder of dev-cpp (Ex. …\Dev-Cpp\lib\) and
and use “-lmysql -lws2_32″ as additional linker options

This way is good for all applications who needs to compile mysql library under

windows with dev c++ or GCC 

相关文章:

  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-10-04
  • 2021-12-21
  • 2021-10-01
猜你喜欢
  • 2021-08-11
  • 2021-08-14
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
相关资源
相似解决方案