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.

Custom compilation options per object?

Hello,

I was wondering if it was possible to define custom compialtion options per object on a project. For example, I am using the DSP2833x package which is written in C. My project files are in CPP. When I try to compile with the language option (-pe) embedded_c++, I get errors saying you can't compile C files with this option.

I tried enabling "Treat all C files as CPP files" but that caused over 100 errors to show up while compiling the DSP2833x package.

Are there any makefile templates so I can write my own build procedure? This way I can compile the C sources without the -PE option and the CPP sources with the option enabled. Or is there a way to define this within CC Studio?

  • Ricardo J Madera Nadal said:
    Are there any makefile templates so I can write my own build procedure? This way I can compile the C sources without the -PE option and the CPP sources with the option enabled. Or is there a way to define this within CC Studio?

    Files specific options are supported. This means that you can set build options on a per file level that will take priority over the project level settings. Just 'right-click' on a source file in the C/C++ Projects view and select 'Properties' in the context menu. Then change the build options for just that file.

  • Thank you so much!