开发者

g++ undefined reference to error

开发者 https://www.devze.com 2023-03-18 05:47 出处:网络
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.

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

精彩评论

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