Solved

Compiler probs with O/S version

Posted on 2003-10-27
2
1,038 Views
Last Modified: 2007-12-19
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.
0
Comment
Question by:upliftin
2 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 9627193
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.

0
 
LVL 48

Accepted Solution

by:
AlexFM earned 150 total points
ID: 9627460
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now