我正在为我的公司制作遗留项目,要求我使用特定版本的boost,该版本为1.47.0。我已下载并运行:
./b2 --toolset=gcc variant=debug
它编译了我需要的大多数静态库,只有少数几个。一个是libboost_iostreams。我做了一些研究,发现我似乎缺少一些依赖。
whereis bzip2
bzip2: /bin/bzip2 /usr/share/man/man1/bzip2.1.gz
whereis zlib
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
然而,当我尝试跑步时:
./b2 --with-iostreams -s BZIP2_SOURCE=/bin -s ZLIB_SOURCE=/usr/include
我收到以下错误:
Building the Boost C++ Libraries.
error: Unable to find file or target named
error: '/bin/libbz2.def'
error: referred from project at
error: 'libs/iostreams/build'
更新: Linux版本:16.04
Gcc版本信息: gcc -v 使用内置规格。 COLLECT_GCC = GCC COLLECT_LTO_WRAPPER = / usr / lib中/ GCC / x86_64的-Linux的GNU / 5 / LTO-包装 目标:x86_64-linux-gnu 配置为:../ src /configure -v --with-pkgversion =' Ubuntu 5.4.0- 6ubuntu1〜16.04.9' --with-bugurl = file:///usr/share/doc/gcc-5/README.Bugs - enable-languages = c,ada,c ++,java,go,d,fortran,objc,obj-c ++ --prefix = / usr - program-suffix = -5 --enable-shared --enable-linker-build-id - libexecdir = / usr / lib --without-included-gettext --enable-threads = posix - libdir = / usr / lib --enable-nls --with-sysroot = / --enable-clocale = gnu --enable- libstdcxx-debug --enable-libstdcxx-time = yes --with-default-libstdcxx-abi = new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable- 插件--with-system-zlib --disable-browser-plugin --enable-java-awt = gtk - enable-gtk-cairo --with-java-home = / usr / lib / jvm / java-1.5.0-gcj-5-amd64 / jre - enable-java-home --with-jvm-root-dir = / usr / lib / jvm / java-1.5.0-gcj-5-amd64 - with-jvm-jar-dir = / usr / lib / jvm-exports / java-1.5.0-gcj-5-amd64 --with-arch- directory = amd64 --with-ecj-jar = / usr / share / java / eclipse-ecj.jar --enable- objc-gc --enable-multiarch --disable-werror --with-arch-32 = i686 --with- abi = m64 --with-multilib-list = m32,m64,mx32 --enable-multilib --with- tune = generic --enable-checking = release --build = x86_64-linux-gnu - host = x86_64-linux-gnu --target = x86_64-linux-gnu 线程模型:posix gcc版本5.4.0 20160609(Ubuntu 5.4.0-6ubuntu1~16.04.9)