This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi All,
I am new to CCS ... I am creating a c/cpp library for our company and since I am testing different parts of it as the code develops, I need to be able to change the main file of the project (the one that holds the main function)... in other words I would like to have multiple main files in my project folder but I want to use one at a time.
Please let me know if you have any advice.
CCS (Eclipse) doesn't really know what file contains main(). It simply builds everything in the folder, and lets the linker find it. The Eclipse model has one executable (build result) per Project.
One approach: You could have multiple files, e.g. main-1.c, main-2.c, and swap them in and out of the build using "File Properties->C/C++ Build->Exclude Resource from build". This is a bit cumbersome, but if you don't do it very often it may be the simplest.
Another approach: Create multiple projects (one per main-N.c), then link the common files using "New->File->Advanced->Link to file in the file system". This is rather cumbersome to set up initially, but there's no ongoing maintenance required.
[Edit: Fixed wording a little.]
Hi,
Building up upon Bruce's reply, you can also create multiple Build Configurations that will allow you to include different files via the option mentioned by him. The advantage is that you can switch between them much easier.
Check the following short clips that cover this subject from different angles.
Hope this helps,
Rafael