User forums > Help

using boost/filesystem

<< < (2/6) > >>

TDragon:
You can do it permanently by adding it in the Environment Variables applet (Control Panel / System / Advanced / Environment Variables). A "Path" entry is usually already present, and you can just tack ";C:\MinGW\bin" on to the end of it (assuming MinGW is installed in C:\MinGW).

Or you can do it for the length of a single command prompt session with:

--- Code: ---set PATH=%PATH%;C:\MinGW\bin

--- End code ---

You will also need to do this for the path to bjam.exe, unless you put it in the root of the Boost sources.

A final note:
Questions like this are not truly appropriate for the Code::Blocks forums. If you have further difficulties, you should use the MinGW or Boost mailing lists.

kanesoban:
Helo again,

i think i succesfully built boost. Now, the next question is, how do i link it in Codeblocks to my program ?

Note:
boost build directory is C:\Documents and settings\Kane\build-boost\

TDragon:

--- Quote from: kanesoban on July 11, 2008, 09:50:01 pm ---Now, the next question is, how do i link it in Codeblocks to my program ?

--- End quote ---

* Add whatever folder contains the boost/*.hpp files to your project's include search directories.
* Add whatever folder contains the library files you just built to your project's library search directories.

Then you can add the name of the library you want to link in your project's libraries to link.

kanesoban:

--- Quote ---* Add whatever folder contains the boost/*.hpp files to your project's include search directories.
* Add whatever folder contains the library files you just built to your project's library search directories.
--- End quote ---

Please write this down in simpler steps, and more detail.

TDragon:
Depending on how you've run bjam, the full path to filesystem.hpp will be like "DriveLetter:\Path\To\SomethingWithBoostInIt\include\boost_1_35\boost\filesystem.hpp". In this case, add "DriveLetter:\Path\To\SomethingWithBoostInIt\include\boost_1_35" in the list of directories in the Compiler tab of the Search Directories tab of your project's Build options.

Also depending on how you've run bjam, the full path to libboost_filesystem-1_35.a will be like "DriveLetter:\Path\To\SomethingWithBoostInIt\MaybeLib\libboost_filesystem-1_35.a". In this case, add "DriveLetter:\Path\To\SomethingWithBoostInIt\MaybeLib" in the list of directories in the Linker tab of the Search Directories tab of your project's Build options.

Then, add "boost_filesystem-1_35" to the list of libraries to link in the Linker tab of your project's Build options.

Obviously, you'll have to do a smidge of creative thinking in order to figure out exactly what paths to use. The name of the library file might even be wrong. This is because A) I'm not at a computer with Boost installed, and B) if you can't figure it out, then there are some basic programming concepts you need to learn first.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version