Newbie question... (sorry)
Hi all, sorry for the newbie question... I have been trying to use the boost libraries with no luck I will briefly as possible list the steps I took, so that you can let me know where I went wrong. (please bear with me) 1) I downloaded the latest version and decompressed it so that i have a "C:\boost_1_31_0 directory". 2) I built Boost.Jam by starting the Visual Studio.Net command prompt, cd'ed to the "C:\boost_1_31_0\tools\build\jam_src" directory and invoked the build.bat .... The build was succesfull. 3) Copied the bjam.exe from the "C:\boost_1_31_0\tools\build\jam_src\bin.ntx86" directory to the Vc7/bin directory. 4)Added the VC71_ROOT environment variable to windows with the "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7" path as the value. 5) Made sure that the PATH environment variable had the Vc7\bin path in it. 6) reset. 7) Started the Visual Studio.Net command prompt, cd'ed to the "C:\boost_1_31_0" directory and invoked bjam "-sTOOLS=vc7.1" install ... the whole process started.. building was succesfull (I believe) and I had a new directory c:\Boost with the \include and \lib sub dirs as mentioned in the "Getting Started" page. 8) Started visual studio.NET, went into the menu "Tools->Options->Projects->VC++ Directories" where I set "C:\boost_1_31_0" in the list of INCLUDE directories. 9) Copied a simple example from the boost website to test the libraries, compiled and VC doesn't find one of the header files.. 10) After many, many attempts I lost it and added the "C:\boost_1_31_0\lib" and "C:\boost_1_31_0\bin" to the other list of directories in the LIBRARY and EXECUTABLE list of directories in VC. After loosing it some more (after more attempts) I added even "C:\boost" in the same places as I had done in the previous steps (just in case). Now I get this fatal error "fatal error LNK1104: cannot open file 'libboost_filesystem-vc71-sgd-1_31.lib' " It doesn't seem to find the .lib but I have checked in the boost directories and that .lib is there!!! Any suggestions.... please... I also feel really bad, 'cause it seems I am the only idiot who hasn't been able to do this :(((( If someone can help me I will gladly return the favor (if I can) Thank you very very much in advance, Chris ------------------------ "Programming is Understanding" - Kristen Nygaard (I just wish I could understand more)
"Chris"
9) Copied a simple example from the boost website to test the libraries, compiled and VC doesn't find one of the header files..
Which header file? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Hi Dave,
this a sample of the example I tried to compile to see if the libs had been
built and installed correctly
taken from http://www.boost.org/libs/filesystem/doc/index.htm#Introduction
simple_ls.cpp
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include <iostream>
namespace fs = boost::filesystem;
int main( int argc, char* argv[] )
{
fs::path full_path( fs::initial_path() );
//... rest skipped for brevity
return 0;
}
The header file it could not find was the boost/filesystem/operations.hpp, I
even tried to use the angle brackets (just in case) but still no luck.
I have (with a bit of calm) tried to remove all the paths from VC++ and of
course it tells me that it cannot find the header (which of course is
normal) but when I add "C:\boost_1_31_0" to the list of INCLUDE directories
in VC++ it keeps telling me: "fatal error LNK1104: cannot open file
'libboost_filesystem-vc71-sgd-1_31.lib' "
Can I just ask, did I skip some fundamental step in the build and
installation process?
Thanks again for the help..
Chris
"David Abrahams"
"Chris"
writes: 9) Copied a simple example from the boost website to test the libraries, compiled and VC doesn't find one of the header files..
Which header file?
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
"Chris"
Hi Dave, this a sample of the example I tried to compile to see if the libs had been ... #include "boost/filesystem/operations.hpp" #include "boost/filesystem/path.hpp" #include <iostream> ... The header file it could not find was the boost/filesystem/operations.hpp, I even tried to use the angle brackets (just in case) but still no luck.
Which is the 1st include file seen, compilation stops here. So I'm guessing that it's not finding any of the boost headers.
From your original post:
1) I downloaded the latest version and decompressed it so that i have a "C:\boost_1_31_0 directory".
I have (with a bit of calm) tried to remove all the paths from VC++ and of course it tells me that it cannot find the header (which of course is normal) but when I add "C:\boost_1_31_0" to the list of INCLUDE
Is the directory really called: "C:\boost_1_31_0 directory"? If so you're directory names are inconsistent. Also make sure you've got '0'(zero) and not 'O'(capital oh). directories
in VC++ it keeps telling me: "fatal error LNK1104: cannot open file 'libboost_filesystem-vc71-sgd-1_31.lib' "
So are you now saying that you're compiling ok but not linking? Does 'libboost_filesystem-vc71-sgd-1_31.lib' exist in the directory you've specified in the LIBRARY entry? Are you doing the compilation/link/build from the VC IDE? Did you create a new console project? Jeff Flinn
Chris wrote:
Can I just ask, did I skip some fundamental step in the build and installation process?
If you did the default build+install, which I think you did looking at your first post... You need to add "C:\Boost\include\boost-1_31" to the include search path, and "C:\Boost\lib" to the library search path. Not the directory you unpacked Boost into. HTH. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
THANK YOU RENE!!!
:)))
I added the correct paths like you said and recompiled and VOILA it compiled
and linked everything.
Thank you soo much, and thanks also to all the others who answered my post.
Chris
"Rene Rivera"
Chris wrote:
Can I just ask, did I skip some fundamental step in the build and installation process?
If you did the default build+install, which I think you did looking at your first post... You need to add "C:\Boost\include\boost-1_31" to the include search path, and "C:\Boost\lib" to the library search path. Not the directory you unpacked Boost into.
HTH.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
participants (4)
-
Chris
-
David Abrahams
-
Jeff Flinn
-
Rene Rivera