Code Composser Fails to Compile Options File Include Path.

Feb 07, 2008 1 Replies

Trying to become familiar with Code Composer Version 3.1 I ran into some problems with the complier. The compiler fails to include the path to "Blah.cpp" when using the Options File (-@) to append the contents of a given file to the command line. The goal here was to use system variables to enhance project portability. This seems like such a petty problem but it is bothering the hell out of me...



The setup is as followed:



System Variable => DanTest = C:\CCStudio_V3.1\My Projects



Blah.cpp => Located in directory = C:\CCStudio_V3.1\My Projects \Practice\Deep\Deeper



Options File DanExample.opt Contains the following line =>



-i "%DanTest%\Practice\Deep\Deeper"



With the above setup , a build on the project will fail because file Blah.cpp can not be seen.



What works? I was able to get the following to work:


1.) Options File DanExample.opt changed to contain the following line =>


-i C:\CCStudio_V3.1\My Projects\Practice\Deep\Deeper


2.) Set the include path inside the Build options.

Build Options -> Preprocessor -> Include Search Path (-i) contains the following line =>



%DanTest%\Practice\Deep\Deeper



Again the goal here was to become more familiar with code composer before integrating with a DSP board. Although there are many solutions to the problem, maintaining portability using system variables was the main goal here.



Thanks in advance Dan


The -i option only works for files specified with "#include", which are typically header (.h) files.

If you want a .cpp file to be compiled, you should add it to the project.

You could create and add to the project BlahOptions.cpp, which would consist of:

#ifdef BLAH_OPTION_1 #include "Blah.cpp" #else #include "NotBlah.cpp" #endif

..but be prepared for some trouble debugging Blah.cpp.

--Gene

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required