与提升使用任何增压版本可编译? [英] Compile with boost to use whatever boost version is available?
问题描述
我已经编译在Ubuntu 12.04在Linux软件包,使用升压和这个系统上我有提高1.46。我试图运行在另一个系统上编译的释放和它抱怨找不到libboost_system.so.1.46.1。该系统有提振安装1.49。我如何编译,这样程序使用任何启动的版本存在,而不是在开发计算机上的特定版本。
I've compiled a Linux package on ubuntu 12.04 which uses boost and on this system i have boost 1.46. I tried to run the compiled release on another system and it complains that it can't find libboost_system.so.1.46.1. That system has boost 1.49 installed. How do I compile so that the program uses whatever version of boot exists instead of the specific version on the development machine.
推荐答案
你不能指望你的程序使用不同版本的库工作。
You cannot expect your program to work with a different version of the library.
这是有/不同/版本的事实意味着,他们是/不一样的/.
The fact that there are /different/ versions implies that they're /not the same/.
如上所述,任一
- 静态链接到您的特定版本,或
- 您可以出货的共享库(只要你把它们放到一个应用程序特定的位置,并确保你在运行时找到它们)。顺便说一下,在这里看到的第二个例子:<一href=\"http://stackoverflow.com/questions/22312653/how-to-compile-boost-async-client-cpp/22313790#22313790\">How编译升压async_client.cpp 为相关链接选项使用自定义库(它假定同一位置是在运行时(
rpath的
)要使用LI>
- statically link to your specific version, or
- you can ship the shared libraries (as long as you put them in a app-specific location and make sure you find them at runtime). Incidentally, see the second example here: How to compile boost async_client.cpp for the relevant linker options to use a custom library (it assumes the same location is to be used at runtime (
rpath
)
这篇关于与提升使用任何增压版本可编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!