From: JY on 22 Apr 2010 10:28 Hi, I'm trying to #define a parameter like, #define MY_CONFIG_PARAM 0 in a header file, and then trying to check its value later (in the same header) #if $(MY_CONFIG_PARAM) != 0 #define SOMETHING_ELSE #endif and I need to do something similar in make files. In the Visual Studio environment (VS 2005 SP1) it gives me errors when I add this to the header file. What would be the correct definitions? TIA, JY
From: Igor Tandetnik on 22 Apr 2010 12:54 JY <sd(a)nospamgroup.com> wrote: > I'm trying to #define a parameter like, > > #define MY_CONFIG_PARAM 0 > > in a header file, and then trying to check its value later (in the > same header) > > #if $(MY_CONFIG_PARAM) != 0 > #define SOMETHING_ELSE > #endif #if MY_CONFIG_PARAM != 0 -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
From: Pavel A. on 23 Apr 2010 11:31 In makefile, this woud be !if $(MY_CONFIG_PARAM) != 0 SOMETHING_ELSE=1 !endif and # char is a comment. --pa "Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message news:#kIpJyj4KHA.3712(a)TK2MSFTNGP04.phx.gbl... > JY <sd(a)nospamgroup.com> wrote: >> I'm trying to #define a parameter like, >> >> #define MY_CONFIG_PARAM 0 >> >> in a header file, and then trying to check its value later (in the >> same header) >> >> #if $(MY_CONFIG_PARAM) != 0 >> #define SOMETHING_ELSE >> #endif > > #if MY_CONFIG_PARAM != 0 > > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 >
|
Pages: 1 Prev: Different speeds required for 2 simultaneous threads Next: Template class usage |