I'm trying to build the following code:
#include <boost/iostreams/filter/zlib.hpp>#include <iostream>int main(int argc, char* argv[]){ int a = boost::iostreams::zlib::default_compression; std::cout << a; return 0;}
With the command:
g++ -Wall -ID:\boost_1_72_0 -c -o Source.o Source.cppg++ -Wall -ID:\boost_1_72_0 Source.o -LD:\boost_1_72_0\stage\lib -lboost_iostreams-mgw63-mt-x32-1_72 -o Source.exe
But get error:
Source.o:Source.cpp:(.text+0x17): undefined reference to `boost::iostreams::zlib::default_compression'collect2.exe: error: ld returned 1 exit status
So it seems that iostreams wasn't built properly. How can I check whether boost_iostreams-mgw63-mt-x32-1_72 was built fine? Or what's my problem? I used the following command to build iostreams:
D:\boost_1_72_0>b2 -a -q -j8 address-model=32 link=static threading=multi toolset=gcc runtime-link=shared variant=release --with-iostreams -sBZIP2_SOURCE="C:\Program Files (x86)\GnuWin32" -sZLIB_SOURCE="C:\Program Files (x86)\GnuWin32"