제가 dev c++을 좋아 하는데 mysql을 사용시 라이브러리로 제공하는 파일이 vc만 제공하는 관계로 구글링으로 찾음
한번 써 봤는데 감동받아서 관련 내용을 그대로 옮겨서 찾은 링크과 거기에 있는 내용을 요약하지 않고 그대로 적음 ^^
찾은 링크 : http://www.openwebspider.org/documentation/how-to-link-libmysqllib-with-dev-c-or-gcc-under-windows/
제목 : How to link libmysql.lib with Dev-C++ or GCC under windows
내용 :
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
NOTE:
(1) You could found reimp here:
http://prdownloads.sourceforge.net/mingw/mingw-utils-0.2.tar.gz?download
(2) You can download my libmysql.a or libmysql.dll



최근 덧글