Boost logo

Boost Users :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-07-31 03:27:55


mattknox_ca wrote:
> I don't see any obvious way to make bjam look in my PATH environment variable
> on windows (using gcc) when trying to locate header files and such. Is this
> possible? I have a directory "C:\c_libs" , which underneath I have two
> subfolders: "include" and "lib". I would like to modify user-config.jam (or
> if there is a more appropriate file to modify, please suggest) such that all
> my projects will always have access to the files in these folders without
> having to explictly reference these folders in each project's Jamroot file.
> Right now those folders are in my path environment variable, but I am open
> to the idea of creating explicity environment variables for each of those
> folders if that makes the task easier. But either way, I don't know how to
> do it. I banged my head against the keyboard for a few hours, and that
> didn't help.
>
> Any assistance is greatly appreciated. Thanks,

There are two different cases to distinguish:

1) How do your installed toolsets find system wide libraries?

2) How does Boost.Build (bjam) locate include paths?

ad 1)
    Consult your toolset docs. E.g. on linux the compiler will look
    in /usr/include and /usr/lib by default. Windows compilers will
    look in their (private) directories.

ad 2)
    If you want to have system wide include directories, that are
    honored by Boost.Build you should set up a site-config project
    in your site-config.jam file. (How to do this look into the manual
    under: "Targets in site-config.jam") Then in the usage-requirements
    of this site-config project you can specify these directories.
    You need then only reference the site-project from your Jamfiles.

A third method comes to mind: You might use low level properties
in user-config.jam to insert these directories directly to the toolsets.

Roland


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net