Does anyone have issues with includes that are linked files in CW10.5?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does anyone have issues with includes that are linked files in CW10.5?

1,167 Views
Ainslie
Contributor II


Originally, I had my source & include files all in "Sources", and the access paths included "${ProjDirPath}/Sources" in the user paths. I seemed to get alot of "the file XXX cannot be opened" errors, although not on files that were created from PE. I then tried putting my includes in the Project_Headers folder, with same results (and with that path in Access Paths). In both cases, my files were linked files. I then changed the files in the Project_Headers folder to be actual files, and the error messages went away.

Labels (1)
0 Kudos
3 Replies

968 Views
BlackNight
NXP Employee
NXP Employee

This is not a problem of MCU10.5 (it applies to all Eclipse and their build tools integration). The compiler gets the files (*.c, *.cpp) passed from the IDE, but not the path information for the include files. You need to specify the path to the header files in the compiler option. This is the same as if you have the header files in a physical source folder, but you do not tell the compiler (using the -I or similar option) where he has to look for the header files.

Bottom line: you have to tell the compiler in the options where the header files are, regardless if they are in a physical location, in a folder with linked files or in a linked folder.

I hope this helps.

0 Kudos

968 Views
Ainslie
Contributor II

Erich,

Thanks for the incredibly fast response. I am confused by your response. I see the proper compiler include switch for the include directory (-i "D:\FW 5900\FIB\Main\Main_Project/Project_Headers") but I still get the error when the files are linked. Are you telling me I have to resolve the absolute path of the files, thereby rendering the File Linking mechanism pretty much useless? Is there a variable that is created when you link the files that I could use?

Thanks,

Dave Crose

0 Kudos

968 Views
BlackNight
NXP Employee
NXP Employee

Hi Dave,

the compiler needs the path to the header files physically resolved. So pointing to a 'physical' folder does not help, as the file system has no link in it: only the IDE has the links, not the file system.

This does not mean that you have to provide full absolute paths in the compiler settings: you can use workspace or project relative or variable relative paths.

The compiler operates on the files system, so you have to give him file system information.

I hope this makes it clear.