Note: This question is not technically related to Code::Blocks. For future questions like this, you should look elsewhere.I cannot make a .lib file out of the DLL - apparently when the dll was made it was stripped.
This is the key. (The GCC compiler uses .a files for import libraries rather than .lib files, but it's the same idea.)
What you need to do is create your own import library for that DLL, which you can then use in linking your program or DLL. You'll do this with a handcrafted import/export definitions file and the "dlltool" program. Going by your posted code, you should have a file "FSUIPC.def" containing the following:
LIBRARY FSUIPC.dll
EXPORTS
FSUIPC_Version DATA
Then, from the command prompt, do:
dlltool -d FSUIPC.def -l libFSUIPC.dll.a
This creates the import library "libFSUIPC.dll.a", which should then resolve your undefined reference errors (add "-lFSUIPC" to the command line -- or, in Code::Blocks, just add "FSUIPC" in the link libraries list). It is correct for you to add __declspec(dllimport) to the definition in the header file.
Note that you can import functions with a .def file as well, to avoid your "horrible mangling" and LoadLibrary calls. See
this page in the MinGWiki, as well as the MSDN documentation on .def files -- particularly
this page, as you can use the entryname=internalname syntax to mix'n'match mangled names.
Cheers,
John E. / TDM