IDE: CodeWarrior 10.6
Hello,
I am looking for a better solution to this problem. What I have done is exported project as a zip file. The project contained absolute paths to the location of my source and header files. After deleting the project completely from the hard disk, I unzip the project file in some other location then import the project once again (not to workspace.)
Going to Project --> C/C++ General
Next expand this category
Click on paths and symbols
in the "includes" tab, beneath languages select c,C,cc,cxx,cpp.
Paths to the include directories can be found here.
${ProjDirPath}\..\..\..\..\MyDirectory\mySubDirectory
Every time I import a project the links are broken.
How would I export the project with absolute paths, so that the exported project will have the correct relative paths in an arbitrary location on another workstation?
Is this broken or am I doing something wrong? Should I change the project to relative links before exporting?
I would like all of the required source and header files in the zipped project folder and for the project to be able to find
the files without someone having to specify their locations. Is there a tool for this?
I have browsed the forums for this already:
Which would be the better way to export a codewarrior project and import in another PC?
Thank you.
Robert,
What do you mean with:
I unzip the project file in some other location then import the project once again (not to workspace.)
Which links exactly are the broken ones?
What header files are not found the system or yours?
--
Cesar Rabak
Ok, I followed your advice (thanks!). And the solution seems to be this:
Set all of the project paths to relative when exporting because all paths (abosute and relative) are preserved when exporting.
There are 2 parts to this process
Part #1:
In the Linked resources:
Right click project -> go to "Edit linked resource locations"
Click on the Linked Resources tab.
For all the resources that have been linked (there should be none missing here, denoted by the red circle and X) resolve by referencing them to their absolute location. Once this has been done for all the files click on the "Convert" button, which will convert them to locations with respect to the project location; provided the files have been added to the project correctly.
Part #2
Going to Project --> C/C++ General
Next expand this category
Click on paths and symbols
in the "includes" tab, beneath languages select c,C,cc,cxx,cpp.
Paths to the include directories can be found here.
All of these paths should be relative to your project.. this means.. "$ {ProjDirPath}\ "
How to do this: Click on the add button, click on the "variables" button, click on "ProjDirPath", click ok, then edit the field to include
the directory that contains the file for your project. (All of the source files and header files should be in your project directory.)
After having done this, export the project to a zip file.
I have tested this only importing after unzipping the project (not to work space) but it shouldn't make a difference.
There should not be any broken links when importing to an arbitrary location on your disk.
Glad I've been helpful, Robert.
--
Cesar Rabak