簡體   English   中英

C ++ Windows,使用mingw編譯為靜態庫,並包含在Visual Studio C ++項目中

[英]c++ windows, compile with mingw as static library and include in visual studio c++ project

C ++,Windows(在我的情況下為Windows Phone 8,仿真器的Arm和x86)。 我已經用mingw編譯了boost庫。 結果,我有用於“ libboost_random-mgw48-mt-sd-1_53.a”的此類文件。

是否有可能在Visual Studio C ++項目中包含此靜態庫? 也許使用特殊選項進行編譯...或將該“ .a”文件轉換為與Visual Studio兼容的“ .lib”文件。

我嘗試重命名..但收到一些“未定義的引用”錯誤..因此它們不直接兼容。

請注意,該庫(增強型)無法使用Visual Studio進行編譯。 我有一個懸而未決的問題,仍然沒有答案: https : //stackoverflow.com/questions/23831050/compile-boost-as-static-library-for-windows-phone-8-arm

您不能在Visual C ++中使用g ++目標文件。 但是,您可以使用boost的所有僅標頭模塊,而無需構建任何模塊。 對於其余的文件(例如Boost文件系統),請使用visual c ++進行構建,以與visual c ++一起使用。


回覆

“請注意,該庫(增強)無法使用Visual Studio進行編譯”

那是不對的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM