je commence à utilisé ogre3d sous linux. J'ai prit un tutorial pour compil le code et le comprendre.
Voici le code :
Et j'obtient les erreurs suivantes(je vous mets pour un meilleur compréhension):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <iostream> #include <cstdlib> #include </usr/local/include/OGRE/Ogre.h> #include <Samples/Common/include/ExampleApplication.h> //#define OGRE_PLATFORM LINUX using namespace std; /*int main(int argc, char *argv[]) { cout << "Bonjour Maitre !" << endl; return EXIT_SUCCESS; }*/ class TutorialApplication : public ExampleApplication { protected: public: TutorialApplication() { } ~TutorialApplication() { } protected: void createScene(void) { } }; #ifdef OGRE_PLATFORM // == OGRE_PLATFORM_WIN32 #define WIN32_LEAN_AND_MEAN #include "windows.h" INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT ) #else int main(int argc, char **argv) #endif { // Create application object TutorialApplication app; try { app.go(); } catch( Exception& e ) { #ifdef OGRE_PLATFORM // == OGRE_PLATFORM_WIN32 MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); #else fprintf(stderr, "An exception has occured: %s\n", e.getFullDescription().c_str()); #endif } return 0; }
Pour moi, cela vient du paramétrages du projet, je connais mal kdevelop, je n'ai pas trouve comment lui indiqué ou trouver les .h nécéssaire. Pourriez vous m'aider?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 cd '/home/david/developpement/HelloOgre/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k gmake all-recursive gmake[1]: entrant dans le répertoire « /home/david/developpement/HelloOgre/debug » Making all in src gmake[2]: entrant dans le répertoire « /home/david/developpement/HelloOgre/debug/src » Compilation helloogre.cpp (g++) Dans le fichier inclus à partir de /usr/local/include/OGRE/OgreTimer.h:39, à partir de /usr/local/include/OGRE/OgreRenderTarget.h:37, à partir de /usr/local/include/OGRE/OgreRenderSystem.h:42, à partir de /usr/local/include/OGRE/Ogre.h:88, à partir de /home/david/developpement/HelloOgre/src/helloogre.cpp:28: /usr/local/include/OGRE/GLX/OgreTimerImp.h:33:31: erreur: OgrePrerequisites.h : Aucun fichier ou répertoire de ce type Dans le fichier inclus à partir de /home/david/developpement/HelloOgre/src/helloogre.cpp:30: /usr/include/Samples/Common/include/ExampleApplication.h:24:18: erreur: Ogre.h : Aucun fichier ou répertoire de ce type /usr/include/Samples/Common/include/ExampleApplication.h:25:28: erreur: OgreConfigFile.h : Aucun fichier ou répertoire de ce type Dans le fichier inclus à partir de /usr/include/Samples/Common/include/ExampleApplication.h:26, à partir de /home/david/developpement/HelloOgre/src/helloogre.cpp:30: /usr/include/Samples/Common/include/ExampleFrameListener.h:39:33: erreur: OgreStringConverter.h : Aucun fichier ou répertoire de ce type /usr/include/Samples/Common/include/ExampleFrameListener.h:40:27: erreur: OgreException.h : Aucun fichier ou répertoire de ce type /usr/include/Samples/Common/include/ExampleFrameListener.h:45:21: erreur: OIS/OIS.h : Aucun fichier ou répertoire de ce type /home/david/developpement/HelloOgre/src/helloogre.cpp:61:21: erreur: windows.h : Aucun fichier ou répertoire de ce type In file included from /usr/include/Samples/Common/include/ExampleApplication.h:26, from /home/david/developpement/HelloOgre/src/helloogre.cpp:30: /usr/include/Samples/Common/include/ExampleFrameListener.h:395: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:395: erreur: expected ; before * token /usr/include/Samples/Common/include/ExampleFrameListener.h:396: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:396: erreur: expected ; before * token /usr/include/Samples/Common/include/ExampleFrameListener.h:397: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:397: erreur: expected ; before * token /usr/include/Samples/Common/include/ExampleFrameListener.h:398: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:398: erreur: expected ; before * token /usr/include/Samples/Common/include/ExampleFrameListener.h: In constructor ExampleFrameListener::ExampleFrameListener(Ogre::RenderWindow*, Ogre::Camera*, bool, bool, bool): /usr/include/Samples/Common/include/ExampleFrameListener.h:95: erreur: class ExampleFrameListener does not have any field named mInputManager /usr/include/Samples/Common/include/ExampleFrameListener.h:95: erreur: class ExampleFrameListener does not have any field named mMouse /usr/include/Samples/Common/include/ExampleFrameListener.h:95: erreur: class ExampleFrameListener does not have any field named mKeyboard /usr/include/Samples/Common/include/ExampleFrameListener.h:95: erreur: class ExampleFrameListener does not have any field named mJoy /usr/include/Samples/Common/include/ExampleFrameListener.h:97: erreur: OIS is not a namespace-name /usr/include/Samples/Common/include/ExampleFrameListener.h:97: erreur: expected namespace-name before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:102: erreur: ParamList was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:102: erreur: expected `;' before pl /usr/include/Samples/Common/include/ExampleFrameListener.h:108: erreur: pl was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:110: erreur: mInputManager was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:110: erreur: InputManager has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: expected type-specifier before Keyboard /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: expected `>' before Keyboard /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: expected `(' before Keyboard /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: Keyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: expected primary-expression before > token /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: OISKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:113: erreur: expected `)' before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: mMouse was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: expected type-specifier before Mouse /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: expected `>' before Mouse /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: expected `(' before Mouse /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: Mouse was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: expected primary-expression before > token /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: OISMouse was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:114: erreur: expected `)' before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: mJoy was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: expected type-specifier before JoyStick /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: expected `>' before JoyStick /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: expected `(' before JoyStick /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: JoyStick was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: expected primary-expression before > token /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: OISJoyStick was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:116: erreur: expected `)' before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:119: erreur: mJoy was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h: In member function virtual void ExampleFrameListener::windowResized(Ogre::RenderWindow*): /usr/include/Samples/Common/include/ExampleFrameListener.h:138: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h:138: erreur: expected initializer before & token /usr/include/Samples/Common/include/ExampleFrameListener.h:139: erreur: ms was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h: In member function virtual void ExampleFrameListener::windowClosed(Ogre::RenderWindow*): /usr/include/Samples/Common/include/ExampleFrameListener.h:149: erreur: mInputManager was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:151: erreur: mMouse was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:152: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:153: erreur: mJoy was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:155: erreur: OIS has not been declared /usr/include/Samples/Common/include/ExampleFrameListener.h: In member function virtual bool ExampleFrameListener::processUnbufferedKeyInput(const Ogre::FrameEvent&): /usr/include/Samples/Common/include/ExampleFrameListener.h:170: erreur: OIS is not a namespace-name /usr/include/Samples/Common/include/ExampleFrameListener.h:170: erreur: expected namespace-name before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:172: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:172: erreur: KC_A was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:175: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:175: erreur: KC_D was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:178: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:178: erreur: KC_UP was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:178: erreur: KC_W was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:181: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:181: erreur: KC_DOWN was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:181: erreur: KC_S was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:184: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:184: erreur: KC_PGUP was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:187: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:187: erreur: KC_PGDOWN was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:190: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:190: erreur: KC_RIGHT was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:193: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:193: erreur: KC_LEFT was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:196: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:196: erreur: KC_ESCAPE was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:196: erreur: KC_Q was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:199: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:199: erreur: KC_F was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:206: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:206: erreur: KC_T was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:231: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:231: erreur: KC_SYSRQ was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:240: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:240: erreur: KC_R was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:252: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:252: erreur: KC_P was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h: In member function bool ExampleFrameListener::processUnbufferedMouseInput(const Ogre::FrameEvent&): /usr/include/Samples/Common/include/ExampleFrameListener.h:271: erreur: OIS is not a namespace-name /usr/include/Samples/Common/include/ExampleFrameListener.h:271: erreur: expected namespace-name before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:275: erreur: expected initializer before & token /usr/include/Samples/Common/include/ExampleFrameListener.h:276: erreur: ms was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:276: erreur: MB_Right was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h: In member function virtual bool ExampleFrameListener::frameStarted(const Ogre::FrameEvent&): /usr/include/Samples/Common/include/ExampleFrameListener.h:314: erreur: OIS is not a namespace-name /usr/include/Samples/Common/include/ExampleFrameListener.h:314: erreur: expected namespace-name before ; token /usr/include/Samples/Common/include/ExampleFrameListener.h:319: erreur: mKeyboard was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:320: erreur: mMouse was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:321: erreur: mJoy was not declared in this scope /usr/include/Samples/Common/include/ExampleFrameListener.h:323: erreur: mJoy was not declared in this scope /home/david/developpement/HelloOgre/src/helloogre.cpp: At global scope: /home/david/developpement/HelloOgre/src/helloogre.cpp:63: erreur: INT does not name a type gmake[2]: *** [helloogre.o] Erreur 1 gmake[2]: La cible « all » n'a pas pu être refabriquée à cause d'erreurs. gmake[2]: quittant le répertoire « /home/david/developpement/HelloOgre/debug/src » gmake[2]: entrant dans le répertoire « /home/david/developpement/HelloOgre/debug » gmake[2]: Rien à faire pour « all-am ». gmake[2]: quittant le répertoire « /home/david/developpement/HelloOgre/debug » gmake[1]: *** [all-recursive] Erreur 1 gmake[1]: quittant le répertoire « /home/david/developpement/HelloOgre/debug » gmake: *** [all] Erreur 2 *** Sortie avec l'état : 2 ***
Partager