Author Topic: Project build options and system environment variables  (Read 4545 times)

Offline cbliefhebber

  • Single posting newcomer
  • *
  • Posts: 2
Project build options and system environment variables
« on: July 16, 2013, 11:07:22 am »
I have defined a system wide variable BOOST_DIR in my /.pam_environment that points to my boost directory on Ubuntu 12.04. It works fine in my shells, but does not seem to work in Code::Blocks.

I have added $(BOOST_DIR) to my search directories in project build options. It does seem to understand it to some extend as when I click edit on it, it starts off at the exact directory equal to BOOST_DIR (clicking ... to search for path). However, during compilation it complains about boost/assert.hpp No such file or directory

Anybody used system environment variables before with success? anything I am missing here?

Thanks

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cbliefhebber

  • Single posting newcomer
  • *
  • Posts: 2
Re: Project build options and system environment variables
« Reply #2 on: July 17, 2013, 10:12:12 am »
Thanks, this set me on the right path.

The problem was that code::blocks differentiates between /home/user/.. and ~/..

In code::blocks you need to have the environment variables specified as /home/user/.. if you want to use something in your home directory.