Link to home
Start Free TrialLog in
Avatar of upliftin
upliftin

asked on

Compiler probs with O/S version

Hi,

I am getting an error when compiling :

..\..\..\..\Intermediate\ProxyStub\gndbaseps\gndbase_p.c(106) : fatal error C118
9: #error :  You need a Windows 2000 or later to run this stub because it uses t
hese features:
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
Error executing c:\windows\system32\cmd.exe.

I am building on WIN 2003 Server, and i know that the problem is due to having the wrong O/S code, but i dont know where the compiler checks for this version of windows. I would ideally like to change the code so that the compiler accepts the new windows O/S version. Does anybody know if this is possible. ? ?

This is the part of the code it runs through to generate the error :

#if !defined(__RPC_WIN32__)
#error  Invalid build platform for this stub.
#endif

#if !(TARGET_IS_NT50_OR_LATER)
#error You need a Windows 2000 or later to run this stub because it uses these features:
#error   /robust command line switch.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
#endif

i would be very greatful of any help in finding out how the compiler checks for the O/S version.

Kind Regards
Jon.
Avatar of jkr
jkr
Flag of Germany image

You can correct this behaviour by changing  __RPCNDR_H_VERSION__ to the appropriate version or just

#define TARGET_IS_NT50_OR_LATER

in your code - just add it to the global definition list in the compiler options dialog.

ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial