使用 Boost.build 包含库
我正在使用 boost.build 编译引用库 CGNS 的 C++ 代码,但遇到一些困难使用 boost.build 来做到这一点。 CGNS 编译为一个库,其中包含平台的文件夹,例如用于 linux 构建的 [path]/LINUX。我想在构建中包含库 [path]/LINUX/libcgns.a。我希望这是跨平台的,以便 LINUX 目录被引用用于 LINUX 构建,而 WIN 目录用于 WIN 构建(我相信这有平台条件)。
我设法包含库头文件,但是如何进行库的条件包含?我的简单测试 Jamroot.jam,其中 main.cpp 只是 CGNS 文档中的一个示例。
exe CGNSTest
: src/main.cpp
: <include>../Dependencies/cgnslib ;
另外,我想将 CGNS 库构建到我的二进制文件中(静态引用?)
I am using boost.build to compile a c++ code which references a library, CGNS, but am having some difficulty with using boost.build to do so. CGNS compiles to a library, with a folder for the platform, for example [path]/LINUX for the linux build. I would like to include the library [path]/LINUX/libcgns.a in the build. I would like this to be cross-platform, so that the LINUX directory is referenced for LINUX builds and the WIN directory is used for WIN builds (I believe there are platform conditionals for this).
I managed to include the library header files, but how do I go about the conditional include of the library? My simple test Jamroot.jam, where main.cpp is just an example from the CGNS docs.
exe CGNSTest
: src/main.cpp
: <include>../Dependencies/cgnslib ;
Also, I would like to build in the CGNS library into my binary (static reference?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用两个参考,http://www.highscore.de/cpp/boostbuild/,和http://www.boost.org/doc/tools/build/doc /userman.pdf,我创建了一些有效的东西,但它可能不是理想的。
Using two references, http://www.highscore.de/cpp/boostbuild/, and http://www.boost.org/doc/tools/build/doc/userman.pdf, I created something that works, but it may not be the ideal.