undefined reference when linking

BlitzMax Forums/BlitzMax Programming/undefined reference when linking

andre72(Posted 2008) [#1]
Hi,

I've a small project in C++ that I like to use in BM.
In VC++ 6 ist works fine and compiling in BM also.
However when BM try to link it there're some errors reportet:
TerminalConnectDemo.cpp.console.release.win32.x86.o:TerminalConnectDemo.cpp:(.text+0xa): undefined reference to `_imp___ZN13TermConnUtils9DDF2intIPEPKc

I think the matter is that the linker don't know anything about the dll that it use.
When I've a look I've there two more files: thelib.lib and thelib.map.
Maybe somebody can show me the right way how to tell the linker that it gets the references from these files - or what kind of file is used for the linker?

Thanks,

Andre


Brucey(Posted 2008) [#2]
You cannot use a C++ ABI compiled in VC++ with GCC (BlitzMax).

You either need to compile the DLL with GCC, or expose the API with C functions.

VC++ and MinGW use different name-mangling for C++, which is why you see undefined references when linking.