Sign in to follow this  
supagu

[linux] eclipse include directroy using environment variable

Recommended Posts

im trying to port my code to linux, from vc2005. in vc2005 i have an environment variable to locate my base folder for my code libraries. Im trying to set this up for eclipse. say i have the folder /home/user/workspace which has in it: /home/user/workspace/memory/memory.h /home/user/workspace/file/file.cpp now when i go to compile file.cpp it has: #include "memory/memory.h" so my environment variable is: PROGRAMMING=/home/user/workspace so in eclipse under the g++ directories tab i have put: $PROGRAMMING but it still fails to find the file. ideas?

Share this post


Link to post
Share on other sites
You can/have to tell eclipse to use your environment variable. Go to Project->Properties and navigate to the "Environment" tab under the "C/C++ Build" settings. There choose "New" and select your environment variable from the drop down list.
That should do it...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this