Tool Settings vs. C/C++ General settings

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

Tool Settings vs. C/C++ General settings

342 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cv_men on Wed Feb 18 09:12:41 MST 2015
Hi,

What is the difference between settings made in
Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Includes
and
Project Properties -> C/C++ General -> Paths and Symbols -> Includes
?

Same question applies to various other settings present in
Project Properties -> C/C++ Build -> Settings -> Tool Settings
as well as in
Project Properties -> C/C++ General
.

Many thanks
Markus
0 Kudos
4 Replies

322 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cv_men on Thu Feb 19 10:44:13 MST 2015
From my perspective, the Eclipse CDT documentation you mentioned isn't very helpful at all.

The important point for me is to set up each project "correctly" for its own. With a whole bunch of libraries and executables in the workspace,  I would otherwise have to reconfigure all related projects when doing e.g. restructuring of includes. This seems to be only possible with correctly set up and exported paths under the C/C++ General section.

One thing that isn't even possible without is compiling one library against two different versions of another library in two different build configurations. A depending executable project will only correctly link if exported entries are correctly configured on a per build config basis of the "upper" library.

One thing I'd like to add here for the interested reader: CDT doesn't handle exported entries correctly. So if you refer to a library project and suddenly have weird stuff popping up in one of the above mentioned sections under  C/C++ General, then you most likely have old entries in the included project's externalSettings section. No, you can't necessarily find it on the properties pages. Go have a look directly into the .cproject file to find out. But be careful what you are doing there.
0 Kudos

322 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Feb 19 05:20:37 MST 2015
The documentation is in the product. You can find it by search for
"Adding Include paths and symbols"

It can also be found online here:
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_proj_paths....

I would recommend that you set up each project correctly, using the Compiler/Linker settings and not the method that you suggest.
0 Kudos

322 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cv_men on Thu Feb 19 03:59:31 MST 2015
That didn't quite answer my question.

As I realized that these settings are quite important and couldn't find any additional documentation, I set up some test projects to find out on my own. Here's my conclusions, please feel free to comment or correct. I hope this collection can help others as well.

[list]
  [*]Paths and Symbols -> Includes

As describes in the previous post, Tools Settings defines compile time settings. Nevertheless, Paths and Symbols is the place to go to define your include folders which can be exported to dependent projects. These will - even at compile time! - use what is defined here. So most important you must manually sync Tools Settings with Paths and Symbols if you want to make any depending project build correctly.
  [*]Paths and Symbols -> Symbols, Libraries, Library Paths

Expected to work in the same way as Includes, but unverified for now.
  [*]Paths and Symbols -> Source location

This one is easy, as there's no conflicting or competing setting under Tools Settings.
It defines, which files are actually passed to the tool chain (compiler).
  [*]Paths and Symbols -> Includes

Same here, no conflicts. It works exactly as the help text says: expressing dependencies between Build configurations in different projects. Read the help for details.
[/list]
0 Kudos

322 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Feb 18 09:22:58 MST 2015
Tools Settings are the options you actually pass to the compiler/assembler/linker when building your project.

The others are 'discovered' (typically after building the project) and then used by the IDE's Indexer. This allows the Indexer to find, for example, the 'system' header files the location of which would otherwise be unknown. The Indexer is what allows you to browse through your source file by selecting variables, functions, header files etc and "Open Declaration" (F3).. amongst many other things
0 Kudos