Erreur de compilation

Résolu
sdecorme - 19 oct. 2012 à 14:42
 sdecorme - 19 oct. 2012 à 15:04
Bonjour,
Je tente de compiler le code source d'un programme fourni par microchip , mais j'obtiens cette erreur :
Erreur 1 error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcore.h 35

J'ai compris que mon problème venait de la version de mon windows si je suis l'erreur je trouve dan un fichier de mon projet
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0510 // 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 98 and 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

Par contre je ne sais pas ou changer dans mon programme , est-ce dans les propriètés du projet ?

Je suis un peu flou , désolé .
Mais je peux vous donner le code source si besoin .

Merci

1 réponse

C'est bon j'ai trouvé il faut mettre
#define _WIN32_WINNT 0x500
avant les définitions dans le fichier stdafx.h

En effet ma version de vc est plus récente que celle qui a crée le projet.
3
Rejoignez-nous