NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Environment Variables in project settings on Windows (Cygwin)

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
fwgx



Joined: 10 Nov 2009
Posts: 1

PostPosted: Tue Nov 10, 2009 3:03 pm    Post subject: Environment Variables in project settings on Windows (Cygwin) Reply with quote

I currently have a number of netbeans projects that have been developed on Linux x64 and work fine. I have a few include and library directories defined in the projects that use an environment variable like so:

${AN_ENV_HERE}/some_other_bit/of_path

Now I need to add another project configuration so that we can also build these projects under windows using Netbeans with Cygwin. I can add the new configuration OK and everything seems to work apart from that the Windows version of Netbeans doesn't like the environment variables in the project settings.

I've tried changing the syntax to be more like the Windows env var syntax:

%{AN_ENV_VAR}%
%AN_ENV_VAR$
"%AN_ENV_VAR%"

but nothing has worked. What is the syntax for using windows environment variables in the Netbeans project settings?

If I specify an absolute path then it works but I'd really rather not do so.

We are using Netbeans 6.5.1 for compatibility reasons and there's little to no chance we will be able to use a later version so that's not an option.


any help is much appreciated.

~Paul
Back to top
sigzegv



Joined: 18 Oct 2009
Posts: 7

PostPosted: Thu Dec 03, 2009 9:47 am    Post subject: Reply with quote

I have the same question as above.

I am working on a project on 2 computers, libraries are the same, but paths to link them are different. How can I setup and use global variables to dynamically change link path ?
Back to top
postmortem



Joined: 04 Jun 2009
Posts: 85
Location: Midwest USA

PostPosted: Thu Dec 03, 2009 2:09 pm    Post subject: Reply with quote

the variables in project settings are for running the project; not compiling. Netbeans does not have feature that you need.

Workaround I have found is
create another makefile that defines the env. variables
includes your makefile used for compilation
make Netbeans use new makefile.


Also you don't need to change format $(x)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo