[iostreams] Linker error
Hi,
with the following test program:
<code>
#include
Klaus Nowikow wrote:
Hi,
with the following test program:
<code> #include
int main(int argc, char* argv[]) { return 0; } </code>
I get the linker error (MSVC 7.1): LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc71-mt-1_33.lib'
A similar error occurs with "zlib.hpp" instead of "bzip2.hpp": LINK : fatal error LNK1104: cannot open file 'libboost_zlib-vc71-mt-1_33.lib'
I did not find this lib files in my Boost library directory, so I might have missed something when I built Boost.
This is what I did:
- Got the sources for the bzip2 and the zlib libraries - Built the libs - Built Boost with this command line:
bjam "-sTOOLS=vc-7_1" "-sNO_COMPRESSION=0" "-sNO_ZLIB=0"
I think you need to ommit NO_COMPRESSION, NO_ZLIB, .. from the command lines. Simply defining the environment variables specifying the ;ocations source of the headers and binaries will enable compression support. Let me know if it works.
"-sZLIB_LIBPATH=c:/dev/Libraries/zlib/lib" "-sZLIB_INCLUDE=c:/dev/Libraries/zlib/include/zlib" "-sNO_BZIP2=0" "-sBZIP2_LIBPATH=c:/dev/Libraries/bzip2/lib" "-sBZIP2_INCLUDE=c:/dev/Libraries/bzip2/include/bzip2" (without the line breaks of course)
Best regards, Klaus
-- Jonathan Turkanis www.kangaroologic.com
Jonathan Turkanis
Klaus Nowikow wrote: [...]
<code> #include
int main(int argc, char* argv[]) { return 0; } </code> I get the linker error (MSVC 7.1): LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc71-mt-1_33.lib' [...]
- Got the sources for the bzip2 and the zlib libraries - Built the libs - Built Boost with this command line: bjam "-sTOOLS=vc-7_1" "-sNO_COMPRESSION=0" "-sNO_ZLIB=0"
I think you need to ommit NO_COMPRESSION, NO_ZLIB, .. from the command lines. Simply defining the environment variables specifying the ;ocations source of the headers and binaries will enable compression support.
Let me know if it works.
It works, thank you. The autolinking feature still tries to link (lib)boost_bzip2-vc71-mt-1_33.lib, so in addition to omitting NO_COMPRESSION... I had to define the preprocessor symbol BOOST_IOSTREAMS_NO_LIB in my project settings and add boost_iostreams-vc71-mt-1_33.lib manually (this works because both bzip2.cpp and zlib.cpp are be compiled into (lib)boost_iostreams-vc71-mt-1_33.lib). I also tried to add -sBZIP2_SOURCE=... and -sZLIB_SOURCE=... to the bjam call to let bjam create libboost_bzip2 and libboost_zlib. Unfortunately, this does not seem to create the dll versions. -- Klaus
Klaus Nowikow wrote:
Jonathan Turkanis
writes: Klaus Nowikow wrote:
I think you need to ommit NO_COMPRESSION, NO_ZLIB, .. from the command lines. Simply defining the environment variables specifying the ;ocations source of the headers and binaries will enable compression support.
Let me know if it works.
It works, thank you.
The autolinking feature still tries to link (lib)boost_bzip2-vc71-mt-1_33.lib, so in addition to omitting NO_COMPRESSION... I had to define the preprocessor symbol BOOST_IOSTREAMS_NO_LIB in my project settings and add boost_iostreams-vc71-mt-1_33.lib manually (this works because both bzip2.cpp and zlib.cpp are be compiled into (lib)boost_iostreams-vc71-mt-1_33.lib).
I also tried to add -sBZIP2_SOURCE=... and -sZLIB_SOURCE=... to the bjam call to let bjam create libboost_bzip2 and libboost_zlib. Unfortunately, this does not seem to create the dll versions.
Okay, I'll into it. I won't have time for a few days, though. -- Jonathan Turkanis www.kangaroologic.com
Jonathan Turkanis wrote:
Klaus Nowikow wrote:
I also tried to add -sBZIP2_SOURCE=... and -sZLIB_SOURCE=... to the bjam call to let bjam create libboost_bzip2 and libboost_zlib. Unfortunately, this does not seem to create the dll versions.
Okay, I'll into it. I won't have time for a few days, though.
^^^ peer -- Jonathan Turkanis www.kangaroologic.com
participants (2)
-
Jonathan Turkanis
-
Klaus Nowikow