CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2011
    Location
    NY
    Posts
    5

    Boost Library headers won't compile

    I Downloaded the library, followed the directions, copy and pasted the code for the Boost filesystem tutorial and Code::Blocks says that the header files have undefined references. Do I have a setting wrong or something?

    Screenshot of build log
    http://i.imgur.com/MFRh3.jpg

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Boost Library headers won't compile

    If you take a look at the Boost documentation, you will see that for Boost.Filesystem:
    Code:
    Build & Link... Automatic linking
    So, the library is not a header only library, hence you need to build it so it can be linked. Failing to do so results in undefined references, as you have encountered.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Oct 2011
    Location
    NY
    Posts
    5

    Re: Boost Library headers won't compile

    I thought I had Built it though, I opened command prompt inside the boost folder and ran

    bootstrap
    .\b2

    then after a while it told me it was done

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Boost Library headers won't compile

    Maybe you failed to link correctly to Boost when you built your program?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5
    Join Date
    Oct 2011
    Location
    NY
    Posts
    5

    Re: Boost Library headers won't compile

    To Link my project I Added this
    http://i.imgur.com/GhcdJ.jpg
    and This
    http://i.imgur.com/YDGQY.jpg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured