g ++コンパイル済みテストクライアントをVisual Studio 2008でコンパイルされたDLLにリンクしています。次のエラーメッセージが表示されます。g ++定義されていないエラーへの参照
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
g ++とビジュアルスタジオライブラリの間に矛盾がありますか?誤ったDLLインターフェイスを使用していますか?
更新:
グラム++コマンドであるG ++ -o client2.out client2.0 I-cut_driver.dll一般に
このエラーにつながるGCCコマンドを含めることはできますか? – Foon
これはC、C++、またはその両方ですか?あなたの宣言に 'extern" C "'がありませんか? –
私は関数宣言(私は__stdcallへのマクロと思われる)でWINAPIを使用しています。これは、Visual Studio DLLが使用する規約ですか? – Peretz