More Win Problems: Still .a vs .lib
The topic is really getting annoying but it seems impossible to develop plugins under windows. The Problem is that the brevePlugin library is only available in the archiver format.
Like I mentioned silently in my other thread I compiled successfully via mingw crosscompiler. But now I need to link against further libraries which are necessary for my plugin. These libraries are only available in .Lib format.
Though .a and .lib are both static libraries there seems no way of using them at once: Theres a problem with compiler-dependent statements, so that a mingw compiler can only handle its .lib files but not the one of e.g. VisualC. So the problem remains the same as in the beginning.
If anyone knows a way of converting the brevePlugin.a to a windows .lib or has sucessfully recompiled breve completely under windows I would appriciate to hear from it.
Btw: Jon, isn't it possible to support the windows edition of breve with a .lib?

Re: More Win Problems: Still .a vs .lib
I don't have MSVC, but I suspect the easiest way to make an import library
for the Microsoft linker is to tell GNU ld to output a .def listing all the
__declspec(dllexport) symbols, which can then be fed to the 'lib' tool
as described in http://www.geocities.com/yongweiwu/stdcall.htm
As you can see from that page, the C ABI by itself is complex enough;
I wouldn't be surprised if this falls down on the few exported C++ functions.
Including such a .def with the release would be trivial, and I believe the
linker and such tools are in the platform SDK, which doesn't require MSVC,
so including the .lib should be pretty easy too.
Just to follow up on this,
Just to follow up on this, if anybody does figure out a way to create a proper export library using MinGW, I would gladly add it to the build scripts so it appears in all releases.
- jon
The build script should
The build script should probably just do
gcc -Wl,--output-defto make a .def filebased on the __declspec(dllexport) tags in the source.
It's not really practical to generate the .lib from MinGW without using the Microsoft
LIB tool (a 700k binary buried inside the 1GB platform SDK download). Again,
Wu Yongwei elaborates: http://wyw.dcweb.cn/dllfaq.htm
Note that you have to put "NAME breve.exe" at the head of the .def file before
invoking LIB on it, or else the import library (and thus your plugin DLL) will
try to look in a non-existent DLL for the symbols they need to import.