Bonjour,

Je viens d'installer ogre3d avec code block sur ma machine. Voici ce que j'ai installer :

1/ Le SDK de directX (version Mars 2008) - Aucun souci d'install

2/ Mingw de ogre3D (C++ ToolBox) - Aucun souci d'install

3/ Code::Block (sans mingw) - Aucun souci d'install

4/ Ogre3D précompilé pour code::block

J'ai configurer ensuite code block pour inclure les lib et .h de mingw, directx et Ogre3D.

J'ai créé un projet que code::block propose qui me donne ce source en remplissant par defaut les info données:

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
// ----------------------------------------------------------------------------
// Include the main OGRE header files
// Ogre.h just expands to including lots of individual OGRE header files
// ----------------------------------------------------------------------------
#include <Ogre.h>
// ----------------------------------------------------------------------------
// Include the OGRE example framework
// This includes the classes defined to make getting an OGRE application running
// a lot easier. It automatically sets up all the main objects and allows you to
// just override the bits you want to instead of writing it all from scratch.
// ----------------------------------------------------------------------------
#include <ExampleApplication.h>
 
// ----------------------------------------------------------------------------
// Define the application object
// This is derived from ExampleApplication which is the class OGRE provides to
// make it easier to set up OGRE without rewriting the same code all the time.
// You can override extra methods of ExampleApplication if you want to further
// specialise the setup routine, otherwise the only mandatory override is the
// 'createScene' method which is where you set up your own personal scene.
// ----------------------------------------------------------------------------
class SampleApp : public ExampleApplication
{
public:
    // Basic constructor
    SampleApp()
    {}
 
protected:
 
    // Just override the mandatory create scene method
    void createScene(void)
    {
        // Create the SkyBox
        mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox");
 
        // Create a light
        Light* myLight = mSceneMgr->createLight("Light0");
        myLight->setType(Light::LT_POINT);
        myLight->setPosition(0, 40, 0);
        myLight->setDiffuseColour(1, 1, 1);
        myLight->setSpecularColour(1, 1, 1);
    }
};
 
 
// ----------------------------------------------------------------------------
// Main function, just boots the application object
// ----------------------------------------------------------------------------
#if 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
    SampleApp app;
 
    try
    {
        app.go();
    }
    catch( Exception& e )
    {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
        MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
 
        std::cerr << "An exception has occured: " << e.getFullDescription();
#endif
    }
 
    return 0;
}
Je teste en lancent la compilation, cela compile et cela ce lance.

Sur la j'ai aucun souci. Par contre, un truc me plait pas, le binnaire est compiler dans le dossier C:\OgreSDK\bin. Pour le developpement sa me derange pas mais quand je prend les fichiers du dossier pour le mettre ailleurs par exemple : C:\monprojet\monprojet.exe etc. Il me met ce message (piece jointe).

A noter que j'ai aucun fichier ogreSDK sur le lecteur D

Y a pas de possibilité d'avoir un executable autre part que dans C:\ogresdk\bin ?

(Je debute donc pardon si je pose des questions ras du sol :red: )