Discussion:
preprocessor definition
(too old to reply)
f***@yahoo.com
2006-03-11 04:19:09 UTC
Permalink
Hi,
In VC 6.0 , under project setting, C++, preprocessor, default
preprocessor definitions show up like
WIN32,_DEBUG,_WINDOWS,_MBCS,_USRDLL

are these defined somewhere in the microsoft header files or they are
defined on the spot there in the VS at the compliling time taking some
constant value. Where can I see their actual definition.


Also If I want to put my definition _MYDLL=10
can I put it there.


thanks
Cric
Ajay Kalra
2006-03-11 04:28:45 UTC
Permalink
All the preprocess symbols that you mentioned are defined by
Windows/MFC. Those settings are used in MFC/Windows. These are not
arbitrary. You can define your own preprocess symbol in the same
settings.

--------
Ajay Kalra
***@yahoo.com
f***@yahoo.com
2006-03-11 06:49:16 UTC
Permalink
chup be chamaat
Post by Ajay Kalra
All the preprocess symbols that you mentioned are defined by
Windows/MFC. Those settings are used in MFC/Windows. These are not
arbitrary. You can define your own preprocess symbol in the same
settings.
--------
Ajay Kalra
Ajay Kalra
2006-03-11 15:40:32 UTC
Permalink
Post by f***@yahoo.com
chup be chamaat
????

---------
Ajay Kalra
***@yahoo.com
Joseph M. Newcomer
2006-03-11 14:30:08 UTC
Permalink
By definition, they are defined on the spot right there. If they were defined in the
header files there would be no need to define them there.

Note that these symbols AFFECT how the header files are processed, and their behavior is
defined in the Microsoft documentation. But the symbols themselves are defined at the
point where your compilation is performed. You are seeing their actual definition: macros
with empty bodies, that is, they don't have "constant values", they have NO values; they
merely exist, or don't exist. So they are used in #ifdef tests in the header files.

You are certainly free to add your own definitions.
joe
Post by f***@yahoo.com
Hi,
In VC 6.0 , under project setting, C++, preprocessor, default
preprocessor definitions show up like
WIN32,_DEBUG,_WINDOWS,_MBCS,_USRDLL
are these defined somewhere in the microsoft header files or they are
defined on the spot there in the VS at the compliling time taking some
constant value. Where can I see their actual definition.
Also If I want to put my definition _MYDLL=10
can I put it there.
thanks
Cric
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Alexander Grigoriev
2006-03-11 18:38:10 UTC
Permalink
Actually those macros defined in the command line get value 1. To define one
without value, you need /DMACRO= (or /DMACRO="", don't remember exactly).
Post by Joseph M. Newcomer
By definition, they are defined on the spot right there. If they were defined in the
header files there would be no need to define them there.
Note that these symbols AFFECT how the header files are processed, and their behavior is
defined in the Microsoft documentation. But the symbols themselves are defined at the
point where your compilation is performed. You are seeing their actual definition: macros
with empty bodies, that is, they don't have "constant values", they have NO values; they
merely exist, or don't exist. So they are used in #ifdef tests in the header files.
You are certainly free to add your own definitions.
joe
f***@yahoo.com
2006-03-13 04:09:53 UTC
Permalink
Joseph,

You made it clear . Thanks,

Cric.
Post by Joseph M. Newcomer
By definition, they are defined on the spot right there. If they were defined in the
header files there would be no need to define them there.
Note that these symbols AFFECT how the header files are processed, and their behavior is
defined in the Microsoft documentation. But the symbols themselves are defined at the
point where your compilation is performed. You are seeing their actual definition: macros
with empty bodies, that is, they don't have "constant values", they have NO values; they
merely exist, or don't exist. So they are used in #ifdef tests in the header files.
You are certainly free to add your own definitions.
joe
Post by f***@yahoo.com
Hi,
In VC 6.0 , under project setting, C++, preprocessor, default
preprocessor definitions show up like
WIN32,_DEBUG,_WINDOWS,_MBCS,_USRDLL
are these defined somewhere in the microsoft header files or they are
defined on the spot there in the VS at the compliling time taking some
constant value. Where can I see their actual definition.
Also If I want to put my definition _MYDLL=10
can I put it there.
thanks
Cric
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Continue reading on narkive:
Loading...