【问题标题】:c++ windows, compile with mingw as static library and include in visual studio c++ projectc++ windows,使用mingw作为静态库编译并包含在visual studio c++项目中
【发布时间】:2014-06-02 13:58:47
【问题描述】:

c++,windows(在我的例子中是 windows phone 8,arm & x86 for emulator)。我已经用 mingw 编译了 boost 库。因此,我有这样的文件用于 ex“libboost_random-mgw48-mt-sd-1_53.a”。

是否有可能将此静态库包含在 Visual Studio C++ 项目中?也许使用特殊选项进行编译...或将此“.a”文件转换为与 Visual Studio 兼容的“.lib”文件。

我尝试重命名 .. 但收到一些“未定义的引用”错误。所以它们不直接兼容。

请注意,这个库 (boost) 不能用 Visual Studio 编译。我有一个未解决的问题:https://stackoverflow.com/questions/23831050/compile-boost-as-static-library-for-windows-phone-8-arm

【问题讨论】:

    标签: c++ windows visual-studio mingw


    【解决方案1】:

    您不能将 g++ 目标文件与 Visual c++ 一起使用。但是,您可以使用 boost 的所有 header only 模块,而无需构建任何东西。对于其他的,例如 Boost 文件系统,使用 Visual c++ 构建它以与 Visual c++ 一起使用。


    回复

    “请注意这个库(boost)不能用visual studio编译”

    这是不正确的。

    【讨论】:

    • 如果可以使用 VS 为 windows phone arm 构建 boost,请告诉我如何。
    • 我看了你之前的问题。 “.rsp”文件是 Visual C++ 响应文件,它指定编译器命令行参数。看看为什么它被自己调用而不是正确使用(我认为语法就像cl @somefile.rsp)。
    • 是的,这意味着 boost 编译脚本有问题,它们无法使用 VS for windows phone arm 进行编译。我尝试过使用 VS2012 和 VS2013... 已安装 windows phone 8 和 8.1 SDK。
    • 嗯,看看(boost.2283326.n4.nabble.com/…)。它是从 2013 年 4 月开始的。另请参阅 (boost.2283326.n4.nabble.com/…) 从 2014 年 5 月开始
    • 我说的是 2013 年。我是说 2014 年。啊。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-17
    • 1970-01-01
    相关资源
    最近更新 更多