[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

define in *.h file

moongeegee

12/9/2008 4:37:00 PM

There is a define in *.h file, and I wanted to undef it in Makefile.
Please shed a light.
tks
3 Answers

Victor Bazarov

12/9/2008 5:20:00 PM

0

moongeegee wrote:
> There is a define in *.h file, and I wanted to undef it in Makefile.
> Please shed a light.

Makefiles are off-topic. Please ask in the newsgroup for your OS or
your compiler.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

sean_in_raleigh

12/9/2008 7:14:00 PM

0

On Dec 9, 11:37 am, moongeegee <moongee...@gmail.com> wrote:
> There is a define in *.h file, and I wanted to undef it in Makefile.
> Please shed a light.
> tks

You probably can't do this, since any macros you set
or unset on the command-line will be redefined
in the source file.

Your best bet is probably something like:

#ifdef SOME_FLAG
#undef SOME_MACRO
#endif

and then in your makefile say:

cc -DSOME_FLAG ...

or whatever the syntax is for your compiler.

Sean

Juha Nieminen

12/9/2008 8:42:00 PM

0

moongeegee wrote:
> There is a define in *.h file, and I wanted to undef it in Makefile.

You can't. (At least not without modifying the source code you are
compiling.)