|Workspace path as include directory not being resolved [message #1779039]
||Fri, 29 December 2017 19:48
| Brendan Simpson
Registered: December 2017
I am currently trying to set up a project for embedded development using the IAR Eclipse plugins. We have a large existing code base that has many common source files. I have successfully imported the common files using the "File System" import option. All the files were imported as links with virtual folders created as needed. Some of these files are header files.|
The problem arises when I try to build. It seems as though Eclipse is not informing the IAR compiler of these directories to use as header file search paths. Ok, so I go to add the header file search paths manually to the C/C++ General > Paths and Symbols and added the paths as workspace paths (as I have done for other projects in the past), however this does not work.
So then I went to the compiler option in C/C++ Build > Settings > Preprocessor. Once again I added the appropriate paths as workspace paths to the preprocessor search path list. No luck.
Finally, I found that if I add the include paths, either in the General > Paths and Symbols or Preprocessor options as File System Paths, suddenly the compiler is able to locate the appropriate files.
Upon examining the output of the compiler in each of these test cases, I saw that when I tried adding workspace paths, no -I option was generated for the compiler call. I even tried to force it to do so by manually structuring the -I option in the extra options setting, but it appears that the workspace paths are not resolving properly. That is, when I added the -I option manually, the resultant command line showed the -I with no path after it, it was just blank.
Along the way there were some other clues alluding to this:
The includes folder in the project explorer (the one that automatically lists include paths) would gray-out my workspace paths, but would not gray-out file system paths.
I'd really like this to work because I think Eclipse is a superior IDE to IAR Embedded Workbench, and if I'm to win my coworkers over there needs to be a semi painless way to import our common files when starting new projects. Further, I'd ideally like CDT to locate these header locations and pass them to the compiler automatically, so that I don't have to go through the trouble of tracking down every directory where there is a header file. I had hoped that by importing through the file system import process that all the manually specified include path nonsense could be avoided.
Is this an issue with Eclipse itself or with the IAR tools that I'm trying to integrate with?
Powered by FUDForum
. Page generated in 0.02011 seconds