Bonjour à tous,
Qqch m'échappe avec les #include
J'ai trois fichiers
xlcall.h
xloper.h
xloper.cpp
Voici le code de chacun d'entre eux (j'ai enlevé tout ce qui n'est pas nécessaire dedans...)
xlcall.h
xloper.hCode:
1
2
3
4
5 #ifndef _XLCALL_H #define _XLCALL_H #define xltypeBool 0x0004 #endif
et enfin xloper.cppCode:
1
2
3
4
5
6
7
8
9 #ifndef _XLOPER_H #define _XLOPER_H #include <windows.h> #ifndef _XLCALL_H #include "xlcall.h" #endif #endif
Je travaille avec Visual Studio.NET 2003Code:
1
2
3
4
5
6
7
8
9
10
11
12 #include "xloper.h" typedef struct const_xloper { WORD word1; WORD word2; WORD word3; WORD word4; WORD xltype; } const_xloper ; const_xloper xloperBooleanTrue = {1, 0, 0, 0, xltypeBool};
Lorsque je veux compiler uniquement xloper.cpp (donc je vais dans Solution Explorer et je clique droit sur xloper.cpp puis je clique Compile), il me donne l'erreur suivante:
Warning #673: the initial sequence of preprocessing directives is not compatible with those of precompiled header file "Debug\Test20061011.pchi"
.\xloper.cpp(19): error: identifier "xltypeBool" is undefined
const_xloper xloperBooleanTrue = {1, 0, 0, 0, xltypeBool};
^
compilation aborted for .\xloper.cpp (code 2)
Comprends paaaaaasss...
Si qqun peut m'aider il est le bienvenu