|
From: | Bruce Korb |
Subject: | Re: How to get a literal #undef into config.h |
Date: | Tue, 25 Oct 2005 12:06:30 -0700 |
User-agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Keith Marshall wrote:
On Tuesday 25 October 2005 3:45 pm, Brian wrote:Great thanks for the tips. I see its a bit chicken and egg, but is there a reason config.h couldn't just define HAVE_CONFIG_H?Because your source file is expected to use logic like this:-- #ifdef HAVE_CONFIG_H #include "config.h" #endifso if it isn't defined on the command line, config.h will never get the chance to define *anything*.
OTOH, if your project flat won't work on any platform without config.h: #ifndef HAVE_CONFIG_H #define HAVE_CONFIG_H 1 #endif #include "config.h" // include it or die trying, instead of some obtuse // error stemming from incorrect data declarations :-)
[Prev in Thread] | Current Thread | [Next in Thread] |