/ / Fonctions interconnectées - impossible de convertir les arguments - visual-studio, winapi, cppunit, interlocked

Fonctions interconnectées - impossible de convertir les arguments - visual-studio, Winapi, cppunit, interlocked

J'ai besoin de compiler cppunit sur la plate-forme ARM. Tout se compile et fonctionne bien en mode release, mais en mode débogage, les erreurs suivantes sont générées:

Error   1   error C2664: "unsigned int CppUnit::_InterlockedIncrement(volatile unsigned int *)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *" C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 8959    1   cppunit
Error   2   error C2665: "CppUnit::_InterlockedIncrement" : none of the 2 overloads could convert all the argument types    C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 8968    1   cppunit
Error   3   error C2664: "unsigned int CppUnit::_InterlockedDecrement(volatile unsigned int *)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *" C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 8990    1   cppunit
Error   4   error C2665: "CppUnit::_InterlockedDecrement" : none of the 2 overloads could convert all the argument types    C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 8999    1   cppunit
Error   5   error C2664: "unsigned int CppUnit::_InterlockedExchange(volatile unsigned int *,unsigned int)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *" C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9024    1   cppunit
Error   6   error C2665: "CppUnit::_InterlockedExchange" : none of the 2 overloads could convert all the argument types C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9034    1   cppunit
Error   7   error C2664: "unsigned int CppUnit::_InterlockedExchangeAdd(volatile unsigned int *,unsigned int)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *"  C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9058    1   cppunit
Error   8   error C2664: "unsigned int CppUnit::_InterlockedExchangeAdd(volatile unsigned int *,unsigned int)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *"  C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9068    1   cppunit
Error   9   error C2665: "CppUnit::_InterlockedExchangeAdd" : none of the 2 overloads could convert all the argument types  C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9078    1   cppunit
Error   10  error C2665: "CppUnit::_InterlockedExchangeAdd" : none of the 2 overloads could convert all the argument types  C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9088    1   cppunit
Error   11  error C2664: "unsigned int CppUnit::_InterlockedCompareExchange(volatile unsigned int *,unsigned int,unsigned int)" : cannot convert argument 1 from "volatile long *" to "volatile unsigned int *" C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9123    1   cppunit
Error   12  error C2665: "CppUnit::_InterlockedCompareExchange" : none of the 2 overloads could convert all the argument types  C:Program Files (x86)Windows Phone Kits8.1Includewinbase.h 9134    1   cppunit

Cela fait plusieurs jours que je lutte avec cela et je ne trouve pas vraiment de solution à ce problème. J'utilise Visual Studio 2013.

Réponses:

0 pour la réponse № 1

Vous avez accédé à la même chose - vous semblez "inclure de l'intérieur d'un espace de noms (CppUnit dans votre cas). Le compilateur n'aime pas cela - assurez-vous que votre #include est en dehors de tous les espaces de noms.