Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » preproccesor define in header file missing when header file included
preproccesor define in header file missing when header file included [message #207695] Wed, 09 January 2008 14:12 Go to next message
Eclipse UserFriend
Originally posted by: xavipen.gmail.com

Good day,

IŽm trying to define the log4cpp library as a project in Eclipse CDT and
IŽve found the following issue.

There is a header file with creates some defines depending on the platform
this header file is later included in oder header files to define what is
to be compiled and what is not. Till here is the usual stuff.

The problem is that the #define within that config header file appear as
not define in any of the header that includes the config header file.

In oder words what ever Macro I define (i.e. #define VARIABLE_FLAG 1)
will be define in that file but it will as it has never been define in the
files
that include that header file. :-S

Is there something IŽm missing here because this beheiviour doesnŽt sounds
any good to my.

Thanks in advance
Javi
Re: preproccesor define in header file missing when header file included [message #207704 is a reply to message #207695] Wed, 09 January 2008 14:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xavipen.gmail.com

Just on additional information that may be important.

When I drag and drop the .hh file in the Include Browser the following
message appear.

This file 'Portability.hh is currently not part of the index.

Although it should be.

Cheers,
Javi
Re: preproccesor define in header file missing when header file included [message #207913 is a reply to message #207704] Tue, 15 January 2008 19:23 Go to previous messageGo to next message
Chris Recoskie is currently offline Chris RecoskieFriend
Messages: 163
Registered: July 2009
Senior Member
Javi wrote:
> Just on additional information that may be important.
>
> When I drag and drop the .hh file in the Include Browser the following
> message appear.
>
> This file 'Portability.hh is currently not part of the index.
>
> Although it should be.
>
> Cheers,
> Javi
>

..hh is not a file extension that CDT recognizes out of the box. You
will have to add it to the list of content types and also tell the
indexer to index all files.

--
Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt
Re: preproccesor define in header file missing when header file included [message #208808 is a reply to message #207913] Tue, 29 January 2008 14:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xavipen.gmail.com

The version I have from Eclipse does recognizes .hh but just to double
check I changed all the header files to .h extension and still got the
same issue.

Macros are seen only in the header file that define them but not in the
files that include that header file.

Any other idea?

Thanks!
Javi
Re: preproccesor define in header file missing when header file included [message #208845 is a reply to message #208808] Wed, 30 January 2008 10:59 Go to previous message
Anton Leherbauer is currently offline Anton LeherbauerFriend
Messages: 490
Registered: July 2009
Senior Member
Javi wrote:
> The version I have from Eclipse does recognizes .hh but just to double
> check I changed all the header files to .h extension and still got the
> same issue.
>
> Macros are seen only in the header file that define them but not in the
> files that include that header file.
>
> Any other idea?
>
> Thanks!
> Javi
>

Header files which are not included by a source file, are by default not
indexed. Enable the option "Index all files" in the project properties
or the preferences.

Another reason for this issue could be an incomplete include search path
(see the Paths and Symbols property page).

--
Anton Leherbauer
Wind River CDT Team, Austria
Previous Topic:Debugger fails to debug a simple "hello world" program.
Next Topic:C++ / Python / SWIG
Goto Forum:
  


Current Time: Wed Jul 17 23:27:56 GMT 2024

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

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

Back to the top