Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Include Directories and Build Configurations
Include Directories and Build Configurations [message #1699354] Tue, 23 June 2015 14:34
Hans Ekkehard Plesser is currently offline Hans Ekkehard PlesserFriend
Messages: 1
Registered: June 2015
Junior Member
Hi!

I am using Mars RC3 under OS X 10.10 and would like to ask for help with a CDT configuration problem that I cannot quite figure out.

I am using Eclipse to work with a larger, Autotools based project. My directory layout is as follows:
project_root
    source
    bld_a
       include
          config.h
    bld_b
       include
          config.h

where bld_a and bld_b are directories with differently configured versions of my code. In particular, HAVE_XYZ is set in config.h for variant a, but not for variant b.

I created variant a first and added project_root/bld_a/include to the Includes under C/C++ General > Paths and Symbols. This added the config.h to the includes, and in my project code the #else sections for HAVE_XYZ are greyed out as expected.

I then added variant b, set up a new build configuration for it, and added project_root/bld_b/include to the Includes for this variant, and rebuilt the index.

I now expected that switching the active build configuration would exchange the config.h file included and that the #if HAVE_XYZ part of the code would be greyed out when switching to variant b. But this does not happen. Indeed, I cannot even modify the files shown under includes in the project browser manually.

I see though, that under Properties > C/C++ General > Prerprocessor Include Paths ,... > CDT Managed Build Setting Entries, the include path is updated.

I would very much appreciate any suggestions on how to set things up so that the correct include file and thus the correct preprocessor constants are used for each build configuration. Or do I need to set up a separate Project for each configuration to achieve my goal?

Best regards,
Hans Ekkehard
Previous Topic:Error while trying to run callgraph
Next Topic:Forcing new projects to automatically use the settings of other projects
Goto Forum:
  


Current Time: Fri Apr 19 22:01:32 GMT 2024

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

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

Back to the top