Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Different Defines in Different Folders(Different Defines in Different Folders)
Different Defines in Different Folders [message #720108] Mon, 29 August 2011 18:13 Go to next message
Eclipse UserFriend
I have a project that I'd like to use within CDT. One unfortunate thing is that it uses different defines in different folders, and so Eclipse can't show the right sections of code in #ifdef's. Is there some way to make Eclipse understand that different folders have different defines?
Re: Different Defines in Different Folders [message #720345 is a reply to message #720108] Tue, 30 August 2011 08:09 Go to previous messageGo to next message
Eclipse UserFriend
You must set up different build configurations. For each build config you can define source lcoations and symbol definitions.
Re: Different Defines in Different Folders [message #720389 is a reply to message #720108] Tue, 30 August 2011 09:47 Go to previous messageGo to next message
Eclipse UserFriend
You can set different defines in folder properties or even in file properties. Right-click on the folder -> Properties->C/C++ General->Paths and Symbols and select Symbols.

Andrew
Re: Different Defines in Different Folders [message #720708 is a reply to message #720389] Wed, 31 August 2011 02:03 Go to previous messageGo to next message
Eclipse UserFriend
Andrew Gvozdev wrote on Tue, 30 August 2011 15:47
You can set different defines in folder properties or even in file properties. Right-click on the folder -> Properties->C/C++ General->Paths and Symbols and select Symbols.

Andrew

I did not know about this. Thanks for sharing.
Re: Different Defines in Different Folders [message #720977 is a reply to message #720389] Wed, 31 August 2011 11:50 Go to previous messageGo to next message
Eclipse UserFriend
This mostly works. I find that when I open up the properties editor for a directory it doesn't always show the correct thing, but when I change the value and save it everything works. Thanks.

Is there a way that I can set these defines on directories from inside a plugin?
Re: Different Defines in Different Folders [message #721102 is a reply to message #720977] Wed, 31 August 2011 17:31 Go to previous messageGo to next message
Eclipse UserFriend
There are a few ways but perhaps the easiest to explain is http://wiki.eclipse.org/CDT/Developer/FAQ#How_do_I_contribute_Include_.26_Library_paths_to_a_project_configuration.3F

Andrew
Re: Different Defines in Different Folders [message #721533 is a reply to message #721102] Thu, 01 September 2011 22:35 Go to previous messageGo to next message
Eclipse UserFriend
It seems I need a CExternalSettingProvider to do this, from package org.eclipse.cdt.core.settings.model.extension. This doesn't seem to be part of my installation, and I believe I have all CDT packages installed. Where can I find it?
Re: Different Defines in Different Folders [message #721761 is a reply to message #721533] Fri, 02 September 2011 15:05 Go to previous message
Eclipse UserFriend
Dopey me, I didn't notice the plugin example attached to the bug report. Thanks!
Previous Topic:Selection Highlighting on C Compare Viewer
Next Topic:Console output...
Goto Forum:
  


Current Time: Wed Jul 30 17:47:21 EDT 2025

Powered by FUDForum. Page generated in 0.05052 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top