News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Errors with include files and functions in 10.05

Started by earthquake, June 11, 2010, 04:24:16 PM

Previous topic - Next topic

earthquake

I always see errors like this:
When this errors will be solved?
Sorry for possible bad english :)

stahta01

#1
What is the value of WINVER ?
MinGW defaults to a low value if it is not set by user/program.

From windef.h

#ifndef WINVER
#define WINVER 0x0400
/*
* If you need Win32 API features newer the Win95 and WinNT then you must
* define WINVER before including windows.h or any other method of including
* the windef.h header.
*/
#endif


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

earthquake


Jenna

Quote from: C:\MinGW\include\windef.h#ifndef WINVER
#define WINVER 0x0400
/*
* If you need Win32 API features newer the Win95 and WinNT then you must
* define WINVER before including windows.h or any other method of including
* the windef.h header.
*/
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT WINVER
/*
* There may be the need to define _WIN32_WINNT to a value different from
* the value of WINVER.  I don't have any example of why you would do that.
* However, if you must then define _WIN32_WINNT to the value required before
* including windows.h or any other method of including the windef.h header.
*/
Quote from: C:\MinGW\include\w32api.h/* Use these values to set _WIN32_WINDOWS and WINVER to your minimum support
* level */
#define Windows95    0x0400
#define Windows98    0x0410
#define WindowsME    0x0500

/* Use these values to set _WIN32_WINNT and WINVER to your mimimum support
* level. */
#define WindowsNT4   0x0400
#define Windows2000  0x0500
#define WindowsXP    0x0501
#define Windows2003  0x0502
#define WindowsVista 0x0600
I suggest using the value that is nearest to your system.

By the way that's far beyond the scope of this forum.

We are a C::B forum, not a general programming forum, so this threads violates our forum rules and might get locked.