?
Solved

Compiler problems on different windows O/S's

Posted on 2003-10-28
9
Medium Priority
?
319 Views
Last Modified: 2008-03-10
Hi,

I am still getting the same error message when trying to compile some of my work. I know the problem is due to running a different O/S :

Building PxyStub Dll ...
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
 cl /nologo /I"..\..\..\..\Intermediate\Interfaces\\" /c /Ox /DWIN32 /D_WIN32_WI
NNT=0x0400  /DREGISTER_PROXY_DLL /Fo"..\..\..\..\Intermediate\ProxyStub\gndbasep
s\\"  ..\..\..\..\Intermediate\ProxyStub\gndbaseps\dlldata.c
dlldata.c
 cl /nologo /I"..\..\..\..\Intermediate\Interfaces\\" /c /Ox /DWIN32 /D_WIN32_WI
NNT=0x0400  /DREGISTER_PROXY_DLL /Fo"..\..\..\..\Intermediate\ProxyStub\gndbasep
s\\"  ..\..\..\..\Intermediate\ProxyStub\gndbaseps\gndbase_p.c
gndbase_p.c
..\..\..\..\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.

InterfaceBuild - 2 error(s), 0 warning(s)

I have changed the headers in my project that specifythe old O/S,  to include the following new O/S code :
#define _WIN32_WINNT 0x0502
rather than
#define _WIN32_WINNT 0x0400

I have also checked the file RpcNdr.h in the SDK and MSVC++ directories, and updated the macros :

#if (0x502 <= _WIN32_WINNT)
#define TARGET_IS_NT52_OR_LATER                   1
#else
#define TARGET_IS_NT52_OR_LATER                   0
#endif

I am not sure why the error still occurs as i am telling the compiler whicb O/S code to set. Also in the MSVC++ 6.0 Settings, i have added under the Project settings tab - C++ tab - Category General - Common Options : _WIN32_WINNT=0x0502 with no effect.

Please can someone point me in the right direction so i can get this project compiled under the new O/S. I would be most grateful.

Kind Regards
Jon.
0
Comment
Question by:upliftin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9633724
cl /nologo /I"..\..\..\..\Intermediate\Interfaces\\" /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 ...

It looks like 0x0400 version doesn't want to go away. gndbase_p.c is still compiled with this constant.
There should be a way to change this parameter. What is your project type and how it is created?
0
 

Author Comment

by:upliftin
ID: 9633804
The project is a simulator, built in win32 release. I am building on Win2003 server, and the project was previously run on Win2000 without problems. This part of the build is only a small part, the rest of my project builds fine. I am building on MSV C++ 6.0.

Im just not familiar with how the MSV Studio determines what version of windows you are running and how it is propegated through the code.

Sorry im being a bit vague, but i am at a loss for the moment. For some reason the windows version is being set to 0400, but where this is being done i dont know.

Thanks again for all your interest and help.

Kind Regards,
Jon.
0
 
LVL 9

Expert Comment

by:_ys_
ID: 9633827
It's been quite a while since I used VC6.

When building a COM dll, the proxy/stub is compiled seperately. From the file names mentioned it looks like it's this proxy/stub build that's failing.

If memory serves me right, it's within the custom build settings (project properties) that this build is performed. Who knows, it may have 'hard coded' the command-line parameters in there. It's worth a look.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 48

Expert Comment

by:AlexFM
ID: 9633913
Possibly there is a way to change the command line in the project settings. This is a reason I ask what is the project type - to reproduce this and to play with parameters.  I don't remember what is this stuff: autimation, ActiveX, #import, something else?
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9634207
My guess is: use cpp_quote MIDL keyword to add required definition to generated header file.

cpp_quote("#define _WIN32_WINNT 0x0502")

Insert this line to your project IDL file.
0
 

Author Comment

by:upliftin
ID: 9634382
thanks AlexFM, i tried that and it did indeed put the new definition in my header file, but on compilation time i get a warning...

 ..\..\..\..\Intermediate\Interfaces\gndbase.h(91) : warning C4005: '_WIN32_WINNT' : macro redefinition
        unknown(0) : see previous definition of '_WIN32_WINNT'

im thinking now that the problem is within my SDK files as i have had a look around and the windows versiosn are only supported upto _WIN32_WINNT >= 0x0501, which is XP.

I'll keep browsing around and see what i can find, and i'll post any new findings i have.

Thanks again.
Jon,
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 450 total points
ID: 9634436
I hope your initial problem is solved. To turn off warning you can put #pragma warning line to h-file by the same way.
In any case, if your SDK is not up-to-date, it's a good idea to download the newest version.
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546241
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: AlexFM {http:#9634436}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

752 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