0
當我嘗試構建我的C++/CLI dll時,出現LNK2028錯誤。我在我的程序中使用了一個名爲pano13的靜態庫,我正在使用它的一種方法。我的程序中的所有內容都很好,除了我給庫所做的一個方法調用,我在這裏得到了這兩個確切的例外。當試圖使用另一個庫的靜態lib時C++/CLI LNK2028
Error 21 error LNK2028: unresolved token (0A00013B) "int __cdecl panoCreatePanorama(struct fullPath * const,int,struct fullPath *,struct fullPath *)" ([email protected]@[email protected]@[email protected]@Z) referenced in function "public: int __clrcall Surgeon::Stitcher::StitchImage(class System::Collections::Generic::List<class System::String ^> ^,class System::String ^)" ([email protected]@[email protected]@[email protected][email protected]@@@[email protected]@[email protected]@[email protected]@@Z) C:\Users\ndean_000\Documents\Visual Studio 2012\Projects\C#\CameraTest\Surgeon\Surgeon.obj Surgeon
Error 22 error LNK2019: unresolved external symbol "int __cdecl panoCreatePanorama(struct fullPath * const,int,struct fullPath *,struct fullPath *)" ([email protected]@[email protected]@[email protected]@Z) referenced in function "public: int __clrcall Surgeon::Stitcher::StitchImage(class System::Collections::Generic::List<class System::String ^> ^,class System::String ^)" ([email protected]@[email protected]@[email protected][email protected]@@@[email protected]@[email protected]@[email protected]@@Z) C:\Users\ndean_000\Documents\Visual Studio 2012\Projects\C#\CameraTest\Surgeon\Surgeon.obj Surgeon
我包括在項目設置的lib文件,我甚至增加使用#pragma註釋語句包括圖書館,但是我得到這個錯誤。我知道它與混合本機和託管C++有關,但是我不用clr/pure編譯程序,它正在使用/ clr的默認clr編譯進行編譯。任何人有任何想法如何解決它?
您正在調用託管的非託管???? – user1655481
是的,我應該可以在C++/CLI dll中完成這個工作,它不是用/ clr:pure編譯的,據我所知和所見。 –
,你是否從C#代碼中調用這個函數? – user1655481