Partage
  • Partager sur Facebook
  • Partager sur Twitter

"Application Windows"

Sujet résolu
    23 août 2007 à 22:26:27

    Rebonjour chers Zér0s, j'ai ici deux questions...

    La première :

    Sur un tutorial de SFML (Ici) il est écrit :

    "Sous Windows, vous avez peut-être créé un projet "Application Windows", particulièrement si vous ne souhaitez pas voir apparaître une console."

    Quel est l'équivalent d'un projet "Application Windows" sous Code::Blocks?

    La seconde :

    Lorsque je compile le script suivant :
    1. #include <SFML/Window.hpp>
    2. int main()
    3. {
    4.     // Create the main window
    5.     sfWindow App(sfVideoMode(800, 600, 32), "SFML Window", false);
    6.     // Start main loop
    7.     bool Running = true;
    8.     while (Running)
    9.     {
    10.         App.Display();
    11.     }
    12.     return EXIT_SUCCESS;
    13. }


    Le log me retourne :
    1. obj\Debug\main.o:: In function `main':
    2. [...]\main.cpp:17: undefined reference to `sfVideoMode::sfVideoMode(unsigned int, unsigned int, unsigned int)'
    3. [...]\main.cpp:17: undefined reference to `sfWindow::sfWindow(sfVideoMode, std::string const&, bool)'
    4. [...]\main.cpp:23: undefined reference to `sfWindow::Display()'
    5. [...]\main.cpp:26: undefined reference to `sfWindow::~sfWindow()'
    6. [...]\main.cpp:26: undefined reference to `sfWindow::~sfWindow()'
    7. :: === Build finished: 5 errors, 0 warnings ===


    Que dois-je faire pour résoudre ce problème?

    Merci beaucoup.
    • Partager sur Facebook
    • Partager sur Twitter
      23 août 2007 à 22:36:54

      Windows Application = "Win32 GUI Application"
      Un projet win32 quoi.
      • Partager sur Facebook
      • Partager sur Twitter
        23 août 2007 à 22:42:31

        J'ai essayé en Win32 GUI Application, mais le log me retourne la même erreur.

        EDIT :
        Je me suis trompé, cela ne retourne pas la même erreur, mais plutôt :
        1. [...]\main.cpp:: In function `int WinMain()':
        2. [...]\main.cpp:4: error: `sfWindow' undeclared (first use this function)
        3. [...]\main.cpp:4: error: (Each undeclared identifier is reported only once for each function it appears in.)
        4. [...]\main.cpp:4: error: expected `;' before "App"
        5. [...]\main.cpp:10: error: `App' undeclared (first use this function)
        6. [...]\main.cpp:13: error: `EXIT_SUCCESS' undeclared (first use this function)
        7. :: === Build finished: 5 errors, 0 warnings ===
        • Partager sur Facebook
        • Partager sur Twitter
          23 août 2007 à 23:57:00

          J'ai suivi le tutorial à la lettre, si c'est que tu me demandes.

          EDIT :
          J'ai trouvé ^^
          Il fallait mettre -lsfml-window avant -lsfml-system (Ainsi que les -d pour le Debug) et tout fonctionne.
          • Partager sur Facebook
          • Partager sur Twitter
            24 août 2007 à 1:20:24

            Citation : Aostus

            EDIT :
            J'ai trouvé ^^
            Il fallait mettre -lsfml-window avant -lsfml-system (Ainsi que les -d pour le Debug) et tout fonctionne.


            C'est exactement ce que quelqu'un ta répondu sur un autre poste plus bas :x
            • Partager sur Facebook
            • Partager sur Twitter

            "Application Windows"

            × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
            × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
            • Editeur
            • Markdown