On 2010-05-27 11:36Z, relet wrote:
> Thanks Earnie, but that one gave me the same error in the first place:
> $ g++ -L. test.o -lmylib -o test.exe
> test.o:test.c:(.text+0x2b): undefined reference to `Lib_Init()'
> collect2: ld returned 1 exit status
>
> Now, I figured *that* may be because the dll version I currently have
> follows C++ symbol mangling (afaics), or in .def format:
> ?LC_Init@...
> Hence I may not be able to actually link against this dll. I had hoped I
> could link against the helper lib and change the symbols in the DLL when I
> know what will work for mingw. Or can I?
No, it's hopeless. I don't wish to seem negative; I just want to save you
a lot of unproductive effort. Either compile your own code with the same
compiler used to build the library, or get the source and recompile it
with MinGW.
|