Difference between revisions of "Configuring C Projects"
From AtlasWiki
(Created page with "Atlas for C is still in beta and may require some setup. Please refer to the following steps for configuring C projects properly. In the future, this process will be streaml...") |
|||
Line 26: | Line 26: | ||
#*Right-click on the project in the package explorer and select '''Properties'''. | #*Right-click on the project in the package explorer and select '''Properties'''. | ||
#*Under '''Atlas C/C++ Build''', click the button '''Enable Atlas Error Parser''' (if it is not grayed out already) and click '''OK'''. | #*Under '''Atlas C/C++ Build''', click the button '''Enable Atlas Error Parser''' (if it is not grayed out already) and click '''OK'''. | ||
+ | #Add the compiler build command: | ||
+ | #*Right-click on the project in the package explorer and select '''Properties'''. | ||
+ | #* Under '''Atlas C/C++ Build''', add the compiler command to the '''Build Commands'''. These are the commands that will be parsed from the output of the project's makefile. | ||
#Choose the project to be indexed: | #Choose the project to be indexed: | ||
#*Open the '''Atlas''' menu and select '''Manage Project Settings'''. | #*Open the '''Atlas''' menu and select '''Manage Project Settings'''. |
Revision as of 14:24, 5 February 2016
Atlas for C is still in beta and may require some setup. Please refer to the following steps for configuring C projects properly. In the future, this process will be streamlined.
Importing C projects in Eclipse
- Import, if the project has a Makefile:
- Right-click in the package explorer.
- Select Import.
- In the popup dialogue, expand C/C++, select Existing Code as Makefile Project, and click Next.
- Enter a project name and indicate the directory to import.
- Click Finish.
- Import, if the project does NOT have a Makefile:
- Right-click in the package explorer.
- Select New > Project…
- In the popup dialogue, select General > Project and click Next.
- Enter a project name and click Finish.
- Right-click on the project and select Import.
- Enter the parent directory, select files to import, and click Finish.
Setting up C projects for Atlas
- Enable the Atlas Error Parser:
- Right-click on the project in the package explorer and select Properties.
- Under Atlas C/C++ Build, click the button Enable Atlas Error Parser (if it is not grayed out already) and click OK.
- Add the compiler build command:
- Right-click on the project in the package explorer and select Properties.
- Under Atlas C/C++ Build, add the compiler command to the Build Commands. These are the commands that will be parsed from the output of the project's makefile.
- Choose the project to be indexed:
- Open the Atlas menu and select Manage Project Settings.
- Select the project to be indexed, click the Add button, and click OK.
- An index can be run by selecting Index Workspace under the Atlas menu.
Troubleshooting: If Atlas is unable to properly index the project, try the following fixes:
- Clean and build the project and make sure the build output is being correctly parsed:
- Right-click on the project in the package explorer and select Properties.
- Look under Atlas C/C++ Build > Build Configuration File.
- If the Open button under Build Configuration File is grayed out, or if it says zero files were found, then Atlas was unable to detect the build configuration. Select C/C++ Build and uncheck “Use default build command”.
- Adjust the command to make the output verbose. Necessary flags may vary; common options include “V=1” or “VERBOSE=1”.
- Clean and build the project and check that Build Configuration File is nonzero.
- If Atlas’ index is still empty, it may be that the Makefile is improperly reporting changing directories.
- Right-click on the project in the package explorer and select Properties.
- Select C/C++ Build and uncheck “Use default build command”.
- Add the flag “--print-directory”.
- Clean and build the project.
If you experience difficulty in setting up Atlas, please contact [email protected] for assistance.