MinGW not linking against dll

The dll is MinGW compiled as well, so all should be going fine... here's the make file line in question. and the error I'm getting...


g++ src\test.o bi0.dll --no-undefined --enable-runtime-pseudo-reloc -L. -lbi0 -o test.exe
src\test.o:test.cpp:(.text+0x32): undefined reference to `_imp___ZN5error

src\test.o:test.cpp:(.text+0x39): undefined reference to `_imp___Z4testv'


Nothing I try get's rid of these errors.
Are you telling the linker that those definitions will have to be imported?
It believe you had to add __declspec(dllimport) before the return type (it was either that or __declspec(dllexport). I was never any good at remembering the order of pairs).
mmhm I am.

UPDATE: After fighting with it for two days A thought occurred, compile and link the dll at the same time instead of archiving the object files first >->...I've not worked with DLL much sooo I didnt know it wouldn't link right from a ".a" file
Last edited on
Topic archived. No new replies allowed.