Author Topic: Errors with include files and functions in 10.05  (Read 4200 times)

Offline earthquake

  • Single posting newcomer
  • *
  • Posts: 2
Errors with include files and functions in 10.05
« on: June 11, 2010, 04:24:16 pm »
I always see errors like this:
When this errors will be solved?
Sorry for possible bad english :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7789
    • My Best Post
Re: Errors with include files and functions in 10.05
« Reply #1 on: June 11, 2010, 04:29:11 pm »
What is the value of WINVER ?
MinGW defaults to a low value if it is not set by user/program.

From windef.h
Code
#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.
« Last Edit: June 11, 2010, 04:36:45 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline earthquake

  • Single posting newcomer
  • *
  • Posts: 2
Re: Errors with include files and functions in 10.05
« Reply #2 on: June 11, 2010, 06:26:29 pm »
I have set it to 0x0400. Same trouble.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Errors with include files and functions in 10.05
« Reply #3 on: June 11, 2010, 06:57:26 pm »
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.