Path errors when importing projects to a new install

Topics for the Eclipse Environment
Post Reply
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Path errors when importing projects to a new install

Post by rnixon »

I recently changed where my nburn install was located from a C drive to a D drive, then tried to import my old projects. This resulted in a bunch of path errors. It seems eclipse imports the path information along with everything else, so if the path is different it cannot find include files, libraries, etc. At first I started editing the path info for each project, but that was taking too long, so I found a shorter way. There may be better methods out there, but this is what worked for me. Just FYI in case anyone else runs into this.

CLEAR ALL PATH SETTINGS
Right click on the project in the navigation window and select Properties,
Select C/C++ Build -> Settings, click on Restore Defaults, then OK

SELECT PLATFORM AND RELOAD PATH SETTINGS (the platform does not get imported with the project)
Right click on the project in the navigation window, select Properties, select NetBurner Options
Select your target platform in the drop down box
Verify "Reload selected platform properties file" is checked (check it if its not)
Select OK

Project should now build with new path information
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Path errors when importing projects to a new install

Post by Ridgeglider »

Tod's Pluaralsight Eclipse tours have info about this... Highly recommended, although I find it hard to keep track of (and subsequently look up) all of the info presented there...

FYI, take a look at the Properties/Resources/LinkedResources on the PathVariables tab. There is usually a PROJECT_LOC and a WORKSPACE_LOC variable defined, but you can add your own variables that point to any directory. For example MY_LOCATION might point to C:\MyLoc\MyStuff. You can define these variables for each project,and I believe that you can export them and then apply them to the entire workspace. These variables can then be used to in the Properties/C/C++ General/Paths and Symbols settings window with this syntax ${MY_LOCATION}\any_subdirectory. That way if you build a lot of projects that depend on stuff in MY_LOCATION, or if you share code with others who define MY_LOCATION differently, all you have to do is edit one variable.
Post Reply