Monday, November 15, 2010

netbeans c/c++ execution environment variables

running (or debugging)  code using the netbeans c/c++ development module (cnd). i need to set environment variables, eg LD_LIBRARY_PATH. the project properties "run" page has an entry for environment variables which pops up a dialog. "add"ing a variable adds a blank line. but i can't find any way to actually set the variable name or value. clicking, double clicking, pressing space or enter, or just typing all have no effect

as a work-around, you can edit nbproject/private/configurations.xml file and set the section. close and reopen the project (or restart netbeans)
        <environment>
          <variable name="LD_LIBRARY_PATH" value="/opt/local/lib"/>
        </environment>
i'm on amd-64, ubuntu 10.10, java-6-openjdk and i've seen the problem with both nb6.8 and nb6.9.1
here's the forum post, and the bug report

3 comments:

Unknown said...

You just saved my life :) Thank you so much ! (working well)

Kella said...

Thanks a lot!!!

Unknown said...

Worked like a gem. Thank you.