define in *.h file

M

moongeegee

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

sean_in_raleigh

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
 
J

Juha Nieminen

moongeegee said:
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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top