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.

Only include .h files from the #include search path

I have several different folders where header files exist.  In these same folders there are .cpp files.  I have specified the folders under Include Options, but it shows all files (*.h, *.cpp). Is there a way for it to only show the .h files?

 

The way it is now it looks like the .cpp files are in the project twice, because I linked to them and they also show under the includes.  I am using CCS5.4.

Thanks,

David

  • David,

    I'm not quite sure if I understand - where are you referring to when you say it shows all files (*.h, *.cpp)? Perhaps a screenshot would help.

    The "Includes" folder in the Project Explorer view shows the folders that are included using the --include_path compiler option, no matter what files those folders may contain. Are you expanding the "Includes" folders so the files are visible and is that what is confusing you between the source files in the project and the files displayed in the "Includes" folder?

  • Yes, I am expanding the Includes folder, which is where I see the files displayed. 

     

    I have needed to add .cpp files to the project for code composer to see them, but for header files, as long as they are in a folder that is added under the Includes, it finds the header files OK.  I believe in CCS3.3 it only showed the header files under the includes, even if there were .cpp files in the same location.  Maybe CCS5 is just different and I need to re-structure the files.

     

    Here is an example from a project. This project doesn't have any iclude files, but I added the folder anyway as an example.  The main project I have has enough files that a screen shot is very difficult.  I would not expect to see LLTIMER.C under the Includes. It isn't a huge deal, but many files show up twice and it is confusing (at least to me based on how our files are structured.)


    Thanks

     

  • David Sabol said:

    Yes, I am expanding the Includes folder, which is where I see the files displayed. 

    What you are seeing is the expected behavior in CCSv5. The "Includes" folder is simply a folder representation of the paths specified in the include options. It does not perform any sort of filtering to show only header files. Most times the Includes folder does not need to be expanded, but I understand how it can be confusing if you do open it up to look at the header file, for example. Unfortunately that is just the standard Eclipse behavior.