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

  • Thread starter Thread starter vc
  • Start date Start date
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
 
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.
 
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.
 
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.
 
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
 
Back
Top