"Expects a newer version of Windows. Upgrade your Windows version" problem

V

vc

Hi all,

I'm having an application (.exe) that I'm building on Win 2000. When
running the .exe on a Windows 98/NT I get the following error:
"Expects a newer version of Windows. Upgrade your Windows version"

I'm building the application using a makefile that looks like:
!include <win32.mak>
..cpp.obj:
$(cc) $(cdebug) $(cflags) $(cvarsmt) -DSTRICT -YX\
/GX\ "_DEBUG" $<

The application should work on Win98/NT even if it is build on
Win2000, but I assume that I have to set a flag in the Makefile to
make it working (actually the exe should run on all Windows OSs:
95/98/ME/NT/2k/XP), but I don't know which flag.

Hope somebody can give me a solution,
Thanks a lot,
Viv
 
A

Aaron Queenan

Perhaps you have a stdafx.h file with something like the following:

#ifndef WINVER // Allow use of features specific to Windows 95 and Windows
NT 4 or later.

#define WINVER 0x0400 // Change this to the appropriate value to target
Windows 98 and Windows 2000 or later.

#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or
later.

#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to
target Windows 2000 or later.

#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or
later.

#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to
target Windows Me or later.

#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.

#define _WIN32_IE 0x0400 // Change this to the appropriate value to target
IE 5.0 or later.

#endif


In that case, change the values of the #defines to 0x0400 (windows 95).

Regards,
Aaron Queenan.
 
C

Craig Powers

vc said:
I'm having an application (.exe) that I'm building on Win 2000. When
running the .exe on a Windows 98/NT I get the following error:
"Expects a newer version of Windows. Upgrade your Windows version"

I'm building the application using a makefile that looks like:
!include <win32.mak>
.cpp.obj:
$(cc) $(cdebug) $(cflags) $(cvarsmt) -DSTRICT -YX\
/GX\ "_DEBUG" $<

The application should work on Win98/NT even if it is build on
Win2000, but I assume that I have to set a flag in the Makefile to
make it working (actually the exe should run on all Windows OSs:
95/98/ME/NT/2k/XP), but I don't know which flag.

The problem is not in the part of the makefile you showed.

Check your sources and remaining makefile portions to make sure you're
not defining one of the Windows 2000 flags, either _WIN32_WINNT or
WINVER as 0x0500 or greater.
 
K

Kobi Ben Tzvi

vc,
I'm having an application (.exe) that I'm building on Win 2000. When
running the .exe on a Windows 98/NT I get the following error:
"Expects a newer version of Windows. Upgrade your Windows version"

You probably calling some API function that was introduced in Win 2000, see
if you have WINVER defined as 0x0500 or greater those functions usually work
only on Win 2000. Other problem might be that you are compiling with UNICODE
defined, remember that win9x doesn't support unicode.
 
V

vc

Thanks a lot guys ... I found out what I have to do: before !include
<win32.mak>
I have to define TARGETOS = BOTH, where both means Win95 and WinNT.
Seems that in this way it is working just fine ... :)

Viv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top