开发者

g++ undefined reference to error

I am linking a g++ compiled test client with my a dll that was compiled with Visual Studio 2008. It generates the following error message.

client2.o:client2.c:(.text+0x11): undefined reference to `ICD_Create(char*)@4'
client2.o:client2.c:(.text+0x3e): undefined reference to `ICD_Remove()@0'
client2.o:client2.c:(.text+0x88): undefined reference to `ICD_Open(unsigned int, unsigned int, char, unsigned int, unsigned int)@20'
client2.o:client2.c:(.text+0xae): undefined reference to `ICD_Close()@0'
client2.o:client2.c:(.text+0xf7): undefined reference to `ICD_Command(char const*)@4'
client2.o:client2.c:(.text+0x11d): undefined reference to `ICD_Synchronize()@0'
collect2: ld returned 1 exit status

Is there a conflict between g++ and visual studio libraries? am I using the wrong DLL interfa开发者_运维问答ce?

Update:

The g++ command is g++ -o client2.out client2.0 i-cut_driver.dll


In general, C++ code produced with different C++ compilers is not link-compatible. C++ code built with g++ and VisualStudio almost certainly isn't.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜