| |||
| Home > Importing a CodeWarrior Project > Importing a CodeWarrior project | |||
To import a CodeWarrior project into your workspace:
Select File → Import from the main menu.
Select CodeWarrior Project exported as XML from the Import dialog, see Figure 4.1. Click Next.
Use Browse... to select the
folder containing the .xml file, see Figure 4.2.
By default, all the projects that can be imported are selected. If the Projects panel shows more than one project, deselect the projects that you do not want to import.
If your source files are located in a folder above the CodeWarrior project root, you can use the Override XML location option, see Figure 4.3. By selecting a different project root, the import wizard can mirror the parent structure when creating the new project. Figure 4.3 shows the project folder as the parent structure to use for the new project root.
If you do not use this option, resources outside the project root are linked using absolute paths.
In the Location text box, use the default path to create the new project in your current workspace or click Browse... to select an alternative location. Click Next.
If you select Same location as .xml file, the new project is merged in with the existing CodeWarrior files.
Use the Filter include paths option to minimize the include paths option on the command-line. Only paths containing files ending with the specified extensions are added to the command-line options. Extensions must be given as a comma-separated list. For example: h,inc.
If you do not use this option, all folders in the project are added as explicit includes which can be quite extensive.
The location of linked resources can be specified relative to a path variable. This enables you to share projects containing linked resources without having to mirror the same file structure. If you have not specified any path variables, the Link files relative to variable option is disabled, see Figure 4.4. Click on Finish to create your new project.
To add a new path variable, use the General → Workspace → Linked Resources option in the Preferences dialog.
When you import a project using a path variable, the wizard automatically updates the C/C++ → PathEntry Variables option in the Preferences dialog to correspond with the Linked Resources option. Both options must be synchronized with each other. If you subsequently move a resource that is linked using a path variable, you must update both options.
The imported project is visible in the C/C++ Projects view.
If Build Automatically is selected, the project builds when you click on Finish. If not, you must select Project → Build Project from the main menu to complete the build step.