Steven Watanabe wrote:
AMDG
Nathan Ridge wrote:
I'm having some trouble building the Boost libraries on Windows.
- My OS is Windows Vista SP2 - My compiler in MinGW g++ 4.4. The folder containing the g++ executable is in my PATH environment variable.
This is what I've done:
- Downloaded the latest version (1.41) of the Boost libraries from www.boost.org and extracted it to C:\Dev\Libraries\boost (so e.g. C:\Dev\Libraries\boost\libs is a subfolder) - Downloaded the latest version (3.1.17) of Boost Jam from http://sourceforge.net/projects/boost/files/boost-jam and extracted bjam.exe into C:\Dev\Libraries\boost - Opened up a command prompt, cd'd into C:\Dev\Libraries\boost - Ran the command "bjam --with-filesystem variant=release link=static threading=single toolset=gcc"
The output, up to the first error, is the following:
== START BJAM OUTPUT ==
WARNING: No python installation configured and autoconfiguration failed. See http://www.boost.org/libs/python/doc/building.html for configuration instructions or pass --without-python to suppress this message and silently skip all Boost.Python targets Building the Boost C++ Libraries. After the build, the headers will be located at C:\Dev\Libraries\boost The libraries will be located at C:\Dev\Libraries\boost\stage\lib Use 'bjam install --prefix=<path>' if you wish to install headers and libraries to a different location and remove the source tree.
...patience... ...found 441 targets... ...updating 27 targets... common.mkdir stage common.mkdir stage\lib common.mkdir bin.v2 common.mkdir bin.v2\libs common.mkdir bin.v2\libs\system common.mkdir bin.v2\libs\system\build common.mkdir bin.v2\libs\system\build\gcc-mingw-4.4.0 common.mkdir bin.v2\libs\system\build\gcc-mingw-4.4.0\release common.mkdir bin.v2\libs\system\build\gcc-mingw-4.4.0\release\link-static gcc.compile.c++ bin.v2\libs\system\build\gcc-mingw-4.4.0\release\link-static\error_code.o g++: libs\system\src\error_code.cpp: No such file or directory g++: no input files "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DBOO ST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2\libs\system\build\gcc-mingw-4.4.0\release\link -static\error_code.o" "libs\system\src\error_code.cpp" ...failed gcc.compile.c++ bin.v2\libs\system\build\gcc-mingw-4.4.0\release\link-static\error_code.o. .. ...skipped
libboost_system-mgw44-1_41 .lib(clean) for lack of error_code.o. .. ...skipped libboost_system-mgw44-1_41 .lib for lack of error_code.o... ...skipped libboost_system-mgw44-1_41.lib for lack of libboost_system-mgw44-1_41.lib... [more similar errors]
== END BJAM OUTPUT ==
So for some reason, it cannot find libs\system\src\error_code.cpp, which is actually located at C:\Dev\Libraries\boost\libs\system\src\error_code.cpp.
Am I supposed to somehow specify the exact path where it should be looking? I tried adding the option --build-dir=C:\Dev\Libraries\boost, but I still get the same error.
One suspicious thing that I noticed is that without the --build-dir option, the bin.v2 folder that is created is C:\Dev\bin.v2, as opposed to C:\Dev\Libraries\boost\bin.v2 or something like that. Not sure if this is related to my problem or not.
It sounds like it is related.
This is really weird. It sounds like bjam is managing to change directories somehow. Can you open tools/build/v2/tools/gcc.jam, find the compile.c++ action and add the line cd before the call to gcc?
Did you mean 'pwd'? - Volodya