From: Andreas H. <an...@ib...> - 2008-04-20 21:38:07
|
In your Jamfile.v2 you should reference $(BOOST_ROOT) I'll copy/paste my Jamfile.v2 that I use for my little DNS library here. ------ import os ; local BOOST_ROOT = [ os.environ BOOST_ROOT ] ; if [ os.name ] = SOLARIS { lib socket ; lib nsl ; } else if [ os.name ] = NT { lib ws2_32 ; lib mswsock ; } project : requirements <include>../../../ <include>$(BOOST_ROOT) <define>BOOST_ALL_NO_LIB=1 <library>$(BOOST_ROOT)/libs/system/build//boost_system <library>$(BOOST_ROOT)/libs/thread/build//boost_thread <threading>multi <link>static <os>SOLARIS:<library>socket <os>SOLARIS:<library>nsl <os>NT,<toolset>gcc:<library>ws2_32 <os>NT,<toolset>gcc:<library>mswsock ; exe dns_simple : dns_simple.cpp dns_util.cpp ; ---- This Jamfile lives in a directory 3 levels away from the .hpp files that I need. You'll also need the infamous project-root.jam at the base of your directory that you are writing in. Michael Dickey wrote: > Unfortunately, I've been having a very hard time trying to get bjam/ > Boost.Build setup and working properly.. > > First, I find the distinction between "bjam" and "Boost.Build" to be > very confusing (two separate projects, separate distributions, the > names are used interchangeably, and you cannot seem to use one without > the other), and the documentation currently available I think is quite > unclear.. I read through the tutorial, installed the bjam executable > in my path, and installed the boost-build distribution package in /usr/ > share/boost-build. I'm able to build the projects in the examples > directory, but running "bjam" in a cpp-netlib directory gives me: > > Jamroot:11: in modules.load > *** argument error > * rule use-project ( id : where ) > * called with: ( /boost : ) > * missing argument where > /usr/share/boost-build/build/project.jam:956:see definition of rule > 'use-project' being called > /usr/share/boost-build/build/project.jam:312: in load-jamfile > /usr/share/boost-build/build/project.jam:68: in load > /usr/share/boost-build/build/project.jam:170: in project.find > /usr/share/boost-build/build-system.jam:248: in load > /usr/share/boost-build/kernel/modules.jam:261: in import > /usr/share/boost-build/kernel/bootstrap.jam:132: in boost-build > /usr/share/boost-build/boost-build.jam:1: in module scope > > My guess is that this means bjam &| Boost.Build cannot find the boost > libraries? Interestingly enough, I can find no place in the tutorial > or elsewhere in the documentation where it talks about setting this > up, only the setup for your compiler. > > I found some talk about having to set a BOOST_ROOT variable via > google, so I tried pointing this to a directory containing the boost > 1.35.0 distro. Unfortunately, this just gives me a whole other set of > errors. Plus, it would make little sense to me if having a source > distribution is required.. > > mdickey@terra cpp-netlib]$ export BOOST_ROOT=/share/home/mdickey/code/ > boost_1_35_0 > [mdickey@terra cpp-netlib]$ bjam > warning: Graph library does not contain optional GraphML reader. > note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH > to the > note: directories containing the Expat headers and libraries, > respectively. > warning: skipping optional Message Passing Interface (MPI) library. > note: to enable MPI support, add "using mpi ;" to user-config.jam. > note: to suppress this message, pass "--without-mpi" to bjam. > note: otherwise, you can safely ignore this message. > Building Boost.Regex with the optional Unicode/ICU support disabled. > Please refer to the Boost.Regex documentation for more information > (don't panic: this is a strictly optional feature). > /usr/share/boost-build/build/virtual-target.jam:423: in _adjust-name > from module object(file-target)@558 > ... > > Oh my! I know the autotools stuff can be a bit of a dinosaur/pain, > but the good ole "./configure; make" seems a lot more friendly to me! =) > > There must be some simple way to say "Boost is installed in /usr/ > local/". I thought about re-writing the Jamroot file to set > everything up manually as a project, but I'm sure it can't be that > difficult... There must be something silly and trivial that I am > missing here.. > > Thanks for any help, > -Mike > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > |