Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
CODE::BLOCK, CYGWIN and MySql [SOLVED]
Hirogens:
--- Quote from: reckless on July 20, 2011, 02:54:52 am ---not related to C::B so expect this thread to be locked.
just a warning.
and in regards to mysql it is sometimes hard to get to work with mingw/cygwin (not impossible though) my guess is that the import library is broken.
put this in a bat file
call it reimp.bat
@echo off
for %%A in ("%1") do pexports %%A > tmp.def
for %%A in ("%1") do dlltool --dllname %%A --def tmp.def --output-lib lib%%A.a
make sure you have pexports.exe from mingw now run it in a windows prompt in the directory where libmysql.dll is like this reimp libmysql.dll
now you have a libmysql.a in the same dir move it to mingw/lib and try compiling again.
ofc remove the old import library and make sure you actually link against your new one.
--- End quote ---
Thank you very much, Work perfectly
B.Regards
Hirogens
Hirogens:
--- Quote ---You get pretty much the standard answer: read the FAQ Smile
This one: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
And this one: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F
hint: look in the GCC's manual, what -l and -L does...
--- End quote ---
I have read that, but I don't use MinGW, only CYGWIN.
My code must be 100% compatible with linux.
And I use C::B because I don't want developp by remote on my linux server.
B.Regards.
oBFusCATed:
Hm, why do you think I've said something about MinGW?
The tips I've gave you apply for all compilers out there...
Hirogens:
Yes sorry,
But i'm found many help topic on C::B/MinGW but not many on C::B/Cygwin .. :cry:
I have nothing against MinGW, but not quite compatible.
and of course, your help was on all compilers
B.Regards
Hirogens
reckless:
np m8 :)
its pretty general stuff so obfuscated is right to making an import library for gcc using mingw tools will work just as well for cygwin since both use gcc :)
i use it all the time to get import libraries from stuff i cannot build on mingw like apache.
Navigation
[0] Message Index
[*] Previous page
Go to full version