home Forums # Technical Support Compiling with CodeBlocks + MinGW Reply To: Compiling with CodeBlocks + MinGW


As far as I know, dlls can be compiled with debug/symbol information, or without it. In the first case, it is possible to create a library only from the dll file, that a compiler can use in later projects. For example mingw has its /lib subdirectory containing the libraries in order to resolve external references. These *.a files can be generated using the dll file, some grepping and a program like dlltool.

In the downloadable windows package I only found a fuzzylite.dll file that seems to be stripped. A stripped dll has no extra symbol info so *.a libraries used by mingw could not be reconstructed. The missing libfuzzylite.a file led to “unresolved reference” errors when I tried to compile my working project in CodeBlocks-MinGW.

After the compilation of the fuzzylite cmake project with mingw, I got the following binaries:


After I give this directory to mingw, it no longer reports unresolved refs. An example mingw shell command as follows:

mingw32-g++.exe -Wall -g -IC:\fuzzylite40\sources\fuzzylite -c E:\work\fuzzytest\fuzzytest.cpp -o obj\fuzzytest.o
mingw32-g++.exe -LC:\fuzzylite40\bpbuild -o bin\fuzzytest.exe obj\fuzzytest.o -lfuzzylite

…where C:\fuzzylite40\sources\fuzzylite is the include dir containing the required *.cpp headers and classes for development, and C:\fuzzylite40\bpbuild is the dir containing the binaries mentioned above. However, I guess only the libfuzzylite.dll.a is only needed in this example, and of course, the fuzzylite.dll for running the executable.

Unfortunately I don’t have much experience with dll compilation, so I can’t advise how to make a non-stripped dll with full debug info. I guess most IDEs offer it somewhere without us needing to know the command-line syntax. That would be easier if you created some /binaries subdirectory and further subdirs containing linux .so, mingw .a or visual studio libs (whatever they named in case of that).

Keep up the good work.