Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Conditional compilation |
| Date | 2012-02-20 14:52 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jhu8a2$cpe$1@dont-email.me> (permalink) |
| References | <d04b882b-429a-4167-adbb-99a17cd3ac9d@i18g2000yqf.googlegroups.com> |
On 2/20/2012 12:57 PM, ashu wrote:
> Hi all, I have a very trivial problem with conditional compilation.
Since you haven't solved it, how do you know it's trivial?
> /***** wrapper.h****/
>
> #define DEBUG
> #include demo1.h
> #include demo2.h
Missing some punctuation here, probably " marks.
> /*****end of wrapper.h**/
>
> Now if I try to use the conditional compilation flag DEBUG in any of
> these included files, like demo1.h or demo2.h I get an error and the
> compilation fails.
>
> /**** demo1.h ***/
> # if defined (DEBUG)
> #define BASE_ADDRESS
> #endif
>
> /***end of demo1.h***/
>
> Can someone help me and point to me my mistake ? The compilation error
> is BASE_ADDRESS undeclared and I am using GCC.
Please post a short and *complete* example of your problem.
What you've provided above is (1) insufficient to support a
diagnosis, and (2) quite clearly not the code the compiler saw.
Good thing the problem's trivial, right?
--
Eric Sosman
esosman@ieee-dot-org.invalid
Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread
Conditional compilation ashu <ashutosh.ghildiyal@gmail.com> - 2012-02-20 09:57 -0800 Re: Conditional compilation Ian Collins <ian-news@hotmail.com> - 2012-02-21 07:42 +1300 Re: Conditional compilation Shao Miller <sha0.miller@gmail.com> - 2012-02-20 14:52 -0500 Re: Conditional compilation Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-02-20 14:52 -0500
csiph-web