Thread: some questions about Boost libraries

  1. #16
    Registered User
    Join Date
    Nov 2009
    Posts
    2
    I don't think that the need to add libraries to linker path is the problem specific to Boost? Pretty much any other third party library will be affected by this inconvenience. You certainly can move all libraries to the standard directory where Visual Studio keeps libs.

    As for you second point -- are you specifically asking for ISO image that you can burn to CD, and that contains prebuilt libraries? This suggestion was not previously raised by users, I'll keep this in mind.

  2. #17
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Here's what I do when I install a new Boost version for VC++. I can't guarantee that it will work for you, but it should.

    1) Download the source archive.
    2) Extract the source archive, e.g. to C:\boost (I don't do that, but it's easier to type).
    3) Start a VC-enabled console (there's an option in the Tools menu)
    4)
    Code:
    C:
    cd \boost
    bootstrap
    bjam --built-type=complete --without-python msvc stage
    5) Wait. A long time.
    6) In VS, choose Tools->Options->Projects->VC++ Directories->Include Directories, and add C:\boost.
    7) In the Library Directories sibling, add C:\boost\stage\lib
    8) Party.

    I've never had any problems with this sequence.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #18
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by vladimir_prus View Post
    I don't think that the need to add libraries to linker path is the problem specific to Boost? Pretty much any other third party library will be affected by this inconvenience. You certainly can move all libraries to the standard directory where Visual Studio keeps libs.

    As for you second point -- are you specifically asking for ISO image that you can burn to CD, and that contains prebuilt libraries? This suggestion was not previously raised by users, I'll keep this in mind.
    for the first part ok , i'll do sth about that , and yes i dont think either ( and i think i've already said that , this might be due to the wrong procedure i took to compile /build boost . )

    and about that ISO. yes thats exactly what i mean .
    and Thanks a Quadrillion to you and your boost associates for bringing us this great gift . keep up the great work .


    Quote Originally Posted by CornedBee View Post
    Here's what I do when I install a new Boost version for VC++. I can't guarantee that it will work for you, but it should.

    1) Download the source archive.
    2) Extract the source archive, e.g. to C:\boost (I don't do that, but it's easier to type).
    3) Start a VC-enabled console (there's an option in the Tools menu)
    4)
    Code:
    C:
    cd \boost
    bootstrap
    bjam --built-type=complete --without-python msvc stage
    5) Wait. A long time.
    6) In VS, choose Tools->Options->Projects->VC++ Directories->Include Directories, and add C:\boost.
    7) In the Library Directories sibling, add C:\boost\stage\lib
    8) Party.

    I've never had any problems with this sequence.
    tanx dear cornedBee , i'll give it a try . hope this one works for me ,
    and in case it dont, i come to the conclusion that , sth must be wrong with my Visual Studio 2008! may be a reinstallation would be necessary .
    Last edited by Masterx; 11-10-2009 at 11:21 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  4. #19
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Masterx View Post
    for the first part ok , i'll do sth about that , and yes i dont think either ( and i think i've already said that , this might be due to the wrong procedure i took to compile /build boost . )
    Your error has nothing to do with how you build the boost libraries. Guess I'm being ignored and I have better things to do.

    Good luck.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #20
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by Mario F. View Post
    Your error has nothing to do with how you build the boost libraries. Guess I'm being ignored and I have better things to do.

    Good luck.
    nope, first of all i didnt mean to disrespect you or ignore you dear mariof .
    i referred to my previous guess to complement vladimir_prus's idea on the library itself , and needless to say this conversation is supposed to be indicating to my previous post on building , the one before your first post ( i guess).
    i do really appreciate the time you spent to help me and well i really do thank you,
    so all i wana say is just dont get it wrong .
    i dont like misunderstanding , cheer up bro .
    again thank you all .
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  6. #21
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    No worries. I may have released more air than I should. So my apologies too.

    In a nutshell, Boost can be built in numerous ways (I'll add one more: From within Visual Studio IDE). From your previous efforts it is clear they have been already:

    Quote Originally Posted by Masterx View Post
    i did what you told me to.[...] decompressed the boost source codes , and before doing anything , i used .\bjam --clean
    nothing happened! and then started the instructions as told .
    So the libraries have been built and they exist. They are located under a "lib" folder inside the path you used for the --prefix bjam parameter.

    When you then write your code and include any header requiring these compiled libraries, it will not suffice to simply add the library name to the linker options. You need to tell the linker where it should look for that filename.

    Now under gcc (I'm assuming you are using gcc, right?) you can do this in one of 2 ways:

    - Add the path to your system environment variables. Create a new environment variable (if it doesn't exist already) called LIBRARY_PATH and add to it any paths to compiled library files. It works just like your PATH variable; i.e. add paths separating them with a semi-colon.

    - Or, give the fully qualified path (drive:\full_path_to_library\library_name.extensio n) to the linker options.

    Your IDE may also give you the option to instruct the linker to search for libraries in a path defined by you. Without entering into much details, this is slightly different from the first option above (internally it will link against your library with the -L option instead of -l).

    So, that's really the only think missing from your Boost adventure.

    ...

    As for the many ways to build boost, they are mostly a matter of preference. I personally like to keep all my external libraries under a root folder named dev. And I like to keep this folder structure as clean as possible. Hence why I like to use --prefix=c:\dev\boost which allows me to instruct bjam where I want boost to go, and I like the install option over stage (because it will install on --prefix both the compiled libraries and all the header files).

    So for every person you may hear a different story. However what is important is to know that the libraries have been built and where are they so you ca instruct your linker where to look for them.
    Last edited by Mario F.; 11-10-2009 at 09:50 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #22
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    hello all .
    its me again!
    recently i was trying to install the latest version of boost! 1.44! under win7!
    to cut a long story short! : i simply cant get it to compile! it gives me the errors:
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:320: in validate-feature from module feature
    error: unknown feature "<install--build-type>"
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:354: in expand-subfeatures-aux from module feature
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:419: in feature.expand-subfeatures from module feature
    F:/Boost/boost_1_44_0/tools/build/v2/build\build-request.jam:20: in apply-to-property-set from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2/kernel\modules.jam:103: in modules.call-in from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2/util\sequence.jam:48: in sequence.transform from module sequence
    F:/Boost/boost_1_44_0/tools/build/v2/build\build-request.jam:32: in build-request.expand-no-defaults from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:623: in load from module build-system
    F:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import from module modules
    F:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build from module
    F:\Boost\boost_1_44_0\boost-build.jam:17: in module scope from module
    ---------------------------------------------
    Ok . now to be precise , i did the following! :
    unpacked the Boost source code to :
    F:\Boost\Boost_1_44_0
    so everything resides in that boost_1_44_0 folder i wrote
    then fired up my cmd ! and after navigating to the mentioned path above , typed in :
    bootstrap.bat
    then typed!:
    bjam --toolset=gcc "--prefix=F:\Program Files\CodeBlocks\Boost" install--build-type=complete
    then got:
    couple of
    "g++ is not recognized as an internal or external command,operable program or batch file!"
    (actually 4 of these!)
    then got:
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:320: in validate-feature from module feature
    error: unknown feature "<install--build-type>"
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:354: in expand-subfeatures-aux from module feature
    F:/Boost/boost_1_44_0/tools/build/v2/build\feature.jam:419: in feature.expand-subfeatures from module feature
    F:/Boost/boost_1_44_0/tools/build/v2/build\build-request.jam:20: in apply-to-property-set from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2/kernel\modules.jam:103: in modules.call-in from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2/util\sequence.jam:48: in sequence.transform from module sequence
    F:/Boost/boost_1_44_0/tools/build/v2/build\build-request.jam:32: in build-request.expand-no-defaults from module build-request
    F:/Boost/boost_1_44_0/tools/build/v2\build-system.jam:623: in load from module build-system
    F:\Boost\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import from module modules
    F:\Boost\boost_1_44_0\tools\build\v2\kernel\bootst rap.jam:142: in boost-build from module
    F:\Boost\boost_1_44_0\boost-build.jam:17: in module scope from module
    so what is wrong with who! ? me , boost , windows7 ?
    and how can i get this to work!
    ( im planning to download the prebuild library for visual studio 2008! , so i just need to get this to work with CB!)
    by the way dont we have any prebuild libs for CB yet ?
    thanks in advance
    Last edited by Masterx; 11-07-2010 at 07:43 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  8. #23
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Code:
    install--build-type=complete
    That doesn't look like the right options. Look at the example in the docs:
    Code:
    bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage

  9. #24
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by rags_to_riches View Post
    Code:
    install--build-type=complete
    That doesn't look like the right options. Look at the example in the docs:
    Code:
    bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
    thank you brother , its compiling now .
    i made a mistake a year a go while writing down the build instructions for further uses ,after i made it through by this thread ,.
    its really a surprising coincidence that i had the exact problem in exact time in! a year ago! !
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  10. #25
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    and oh , by the way , according to this i was right in compiling procedure for boost !(which failed! guess thats different now for 1.44)
    and another irony is that when i typed :
    bjam "--prefix=F:\Program Files\CodeBlocks\Boost" --toolset=gcc--build-type=complete
    instead of making a folder in CodeBlocks directory! and place the libs there! it placed them in F:\Boost\Boost_1_44_0! , as if i didnt provide any path!
    any explanation for this too?
    Last edited by Masterx; 11-07-2010 at 12:21 PM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  11. #26
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I usually seem to have a bad time compiling the boost libs too...

    I'm using them on ubuntu at the moment, to get them going on that OS takes a single "apt-get" command!

  12. #27
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by Fordy View Post
    I usually seem to have a bad time compiling the boost libs too...

    I'm using them on ubuntu at the moment, to get them going on that OS takes a single "apt-get" command!
    lucky you , i 've never had such a joy , i envy you man (T_T)
    i really need to compile it badly
    i dont know why there are such hassles in compiling a library , really?(o_O)
    why not be any prebuild Iso ? whats the problem of that! or atleast providing a hassle free procedure !?
    i hope i make it at last.
    seems to me no matter what experience i gained a year ago in compiling boost , i had to repeat history each time for each freaking version! (><)
    again would anyone who uses CB and has compiled Boost ( 1.44) under win7,tell me how he/she did make it ?
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  13. #28
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Masterx
    why not be any prebuild Iso ? whats the problem of that! or atleast providing a hassle free procedure !?
    But there are pre-built binaries provided by BoostPro, except that you rejected them back in post #7.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  14. #29
    بابلی ریکا Masterx's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere nearby,Who Cares?
    Posts
    497
    Quote Originally Posted by laserlight View Post
    But there are pre-built binaries provided by BoostPro, except that you rejected them back in post #7.
    i already downloaded the installer and im planning to use that for MS VS2008!
    i couldn't find any other prebuild binaries you are talking about. there is only one prebuild package and thats only for MS Visual Studio as far as i know .( would appreciate you if you let me know which if there is another prebuild packages for other compilers)!
    anyways , so all said im back at where i started a year ago (><) this time under win7! with newer build! and with the walk-through on CB's wiki not working at all! (><)
    Last edited by Masterx; 11-08-2010 at 05:53 AM.
    Highlight Your Codes
    The Boost C++ Libraries (online Reference)

    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.."
    Bill Bryson


  15. #30
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Shouldn't just
    bjam toolset=gcc
    work?

    I have compiled boost some times, but I never have had to specify a path or prefix.
    I typically just do

    bjam variant=debug,release link=static address-model=32,64

    (Note that this is not my exact line, so it's not tested!)

    And everything sorts itself out.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. boost libraries
    By herWter in forum C++ Programming
    Replies: 6
    Last Post: 07-15-2008, 05:35 PM
  2. Why does boost jam build repeating libraries?
    By indigo0086 in forum Tech Board
    Replies: 0
    Last Post: 05-30-2007, 06:35 AM
  3. building boost libraries
    By l2u in forum C++ Programming
    Replies: 3
    Last Post: 05-09-2007, 08:34 AM
  4. instaling boost libraries
    By whackaxe in forum C++ Programming
    Replies: 2
    Last Post: 06-04-2004, 09:33 AM
  5. Two questions (Linking Libraries and Creating Them)
    By Thantos in forum Linux Programming
    Replies: 3
    Last Post: 03-21-2004, 05:01 PM

Tags for this Thread