Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   C/C++ Macros (http://www.go4expert.com/forums/c-cpp-macros-t17019/)

rodrigo555roro 21Apr2009 19:52

C/C++ Macros
I have a macro that looks like:


#define OSAPICALL(osapifunc) (osapifunc)
#include "..\os\vcsupport\include\vcintegrityosstubs.h"
#define OSAPICALL(osapifunc) (stub_##osapifunc)

when I use the macro as follows:
eErr = OSAPICALL( Function1(a, b, &c) );

It has no problem on expanding, however when I try to use the macro inside the first macro as follows:

eErr = OSAPICALL( Function2(
OSAPICALL( Function3() ),
&c) );

I get a compilation error, saying that OSAPICALL is not defined

If I dont define STUB_OS_API_CALLS the Macro works just fine using the two statements shown above.

Can anybody please help me discovering why I can't do this macro when defining STUB_OS_API_CALLS?

dharmaraj.guru 28Apr2009 18:01

Re: C/C++ Macros
Please provide the prompted error

All times are GMT +5.5. The time now is 05:21.