IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques C++ Discussion :

compilation projet opengl


Sujet :

Bibliothèques C++

  1. #1
    Membre régulier
    Inscrit en
    Février 2006
    Messages
    220
    Détails du profil
    Informations forums :
    Inscription : Février 2006
    Messages : 220
    Points : 104
    Points
    104
    Par défaut compilation projet opengl
    Bonjour,

    J'ai récupérer un projet opengl qui tourne sous linux, j'éxécute le makefile sous eclipse C et sous vista mais j'ai des erreurs :

    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
     
    **** Build of configuration Debug for project Infographie ****
     
    **** Internal Builder is used for build               ****
    g++ -O0 -g3 -Wall -c -fmessage-length=0 -oframebuffer.o ..\framebuffer.cc
    In file included from ..\framebuffer.cc:13:
    ..\framebuffer.h:16:19: FL/gl.h: No such file or directory
    ..\framebuffer.h:17:19: FL/Fl.H: No such file or directory
    ..\framebuffer.h:18:29: FL/Fl_Gl_Window.H: No such file or directory
    In file included from ..\framebuffer.cc:13:
    ..\framebuffer.h:33: error: ISO C++ forbids declaration of `GLubyte' with no type
    ..\framebuffer.h:33: error: expected `;' before '*' token
    ..\framebuffer.h:34: error: expected `;' before "size_t"
    ..\framebuffer.h:28: warning: `class framebuffer_t' has virtual functions but non-virtual destructor
    ..\framebuffer.h:54: error: expected class-name before '{' token
    ..\framebuffer.h:70: error: `GLdouble' does not name a type
    ..\framebuffer.h:71: error: `GLdouble' does not name a type
    ..\framebuffer.h:72: error: `GLint' does not name a type
    ..\framebuffer.cc: In constructor `MyGlWindow::MyGlWindow(int, int, int, int, framebuffer_t*)':
    ..\framebuffer.cc:40: error: class `MyGlWindow' does not have any field named `Fl_Gl_Window'
    ..\framebuffer.cc: In member function `void MyGlWindow::draw_pixmap()':
    ..\framebuffer.cc:58: error: `w' was not declared in this scope
    ..\framebuffer.cc:58: error: `h' was not declared in this scope
    ..\framebuffer.cc:64: error: 'class framebuffer_t' has no member named 'getbuffer'
    ..\framebuffer.cc:58: warning: unused variable 'w'
    ..\framebuffer.cc:58: warning: unused variable 'h'
    ..\framebuffer.cc: In member function `void MyGlWindow::print_info()':
    ..\framebuffer.cc:78: error: `ModelViewMatrix' was not declared in this scope
    ..\framebuffer.cc:78: warning: unused variable 'ModelViewMatrix'
    ..\framebuffer.cc:85: error: `ProjectionMatrix' was not declared in this scope
    ..\framebuffer.cc:85: warning: unused variable 'ProjectionMatrix'
    ..\framebuffer.cc:90: error: `Viewport' was not declared in this scope
    ..\framebuffer.cc:90: warning: unused variable 'Viewport'
    ..\framebuffer.cc: In member function `void MyGlWindow::get_coords(int, int, ray&)':
    ..\framebuffer.cc:100: error: `ModelViewMatrix' was not declared in this scope
    ..\framebuffer.cc:100: error: `ProjectionMatrix' was not declared in this scope
    ..\framebuffer.cc:100: error: `Viewport' was not declared in this scope
    ..\framebuffer.cc: In member function `void MyGlWindow::get_matrices()':
    ..\framebuffer.cc:108: error: `ModelViewMatrix' was not declared in this scope
    ..\framebuffer.cc:109: error: `ProjectionMatrix' was not declared in this scope
    ..\framebuffer.cc:110: error: `Viewport' was not declared in this scope
    ..\framebuffer.cc:108: warning: unused variable 'ModelViewMatrix'
    ..\framebuffer.cc:109: warning: unused variable 'ProjectionMatrix'
    ..\framebuffer.cc:110: warning: unused variable 'Viewport'
    ..\framebuffer.cc: In member function `void MyGlWindow::set_view()':
    ..\framebuffer.cc:115: error: `w' was not declared in this scope
    ..\framebuffer.cc:115: error: `h' was not declared in this scope
    ..\framebuffer.cc: In member function `void MyGlWindow::draw()':
    ..\framebuffer.cc:135: error: `valid' was not declared in this scope
    ..\framebuffer.cc: In member function `void MyGlWindow::resize(int, int, int, int)':
    ..\framebuffer.cc:150: error: `Fl_Gl_Window' has not been declared
    ..\framebuffer.cc:151: error: `w' was not declared in this scope
    ..\framebuffer.cc:151: error: `h' was not declared in this scope
    ..\framebuffer.cc:151: warning: unused variable 'w'
    ..\framebuffer.cc:151: warning: unused variable 'h'
    ..\framebuffer.cc: In member function `int MyGlWindow::handle(int)':
    ..\framebuffer.cc:158: error: `FL_PUSH' was not declared in this scope
    ..\framebuffer.cc:162: error: `w' was not declared in this scope
    ..\framebuffer.cc:162: error: `h' was not declared in this scope
    ..\framebuffer.cc:164: error: `redraw' was not declared in this scope
    ..\framebuffer.cc:162: warning: unused variable 'w'
    ..\framebuffer.cc:162: warning: unused variable 'h'
    ..\framebuffer.cc:164: warning: unused variable 'redraw'
    ..\framebuffer.cc:167: error: `FL_DRAG' was not declared in this scope
    ..\framebuffer.cc:170: error: `FL_RELEASE' was not declared in this scope
    ..\framebuffer.cc:174: error: `Fl' has not been declared
    ..\framebuffer.cc:174: error: `event_x' was not declared in this scope
    ..\framebuffer.cc:174: error: `Fl' has not been declared
    ..\framebuffer.cc:174: error: `event_y' was not declared in this scope
    ..\framebuffer.cc:175: error: `Fl' has not been declared
    ..\framebuffer.cc:175: error: `h' was not declared in this scope
    ..\framebuffer.cc:175: error: `Fl' has not been declared
    ..\framebuffer.cc:175: warning: unused variable 'h'
    ..\framebuffer.cc:180: error: `FL_FOCUS' was not declared in this scope
    ..\framebuffer.cc:181: error: `FL_UNFOCUS' was not declared in this scope
    ..\framebuffer.cc:184: error: `FL_KEYBOARD' was not declared in this scope
    ..\framebuffer.cc:189: error: `FL_SHORTCUT' was not declared in this scope
    ..\framebuffer.cc:195: error: `Fl_Gl_Window' has not been declared
    ..\framebuffer.cc:158: warning: unused variable 'FL_PUSH'
    ..\framebuffer.cc:167: warning: unused variable 'FL_DRAG'
    ..\framebuffer.cc:170: warning: unused variable 'FL_RELEASE'
    ..\framebuffer.cc:180: warning: unused variable 'FL_FOCUS'
    ..\framebuffer.cc:181: warning: unused variable 'FL_UNFOCUS'
    ..\framebuffer.cc:184: warning: unused variable 'FL_KEYBOARD'
    ..\framebuffer.cc:189: warning: unused variable 'FL_SHORTCUT'
    Build error occurred, build is stopped
    Time consumed: 1041  ms.
    Voici le makefile que j'exécute :

    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
     
     
     
    # Configuration section -------------------------------------------------------
    # Filename to give to final executable
    OUTPUT := gray
    # File extension of source files
    EXT := .cc
    # List flags to pass to C/C++ preprocessor
    CPPFLAGS += 
    # List flags to pass to C++ compiler
    CXXFLAGS += -Wall -O2 
    # List flags to pass to linker
    LDFLAGS += 
    # List additional system libraries to link with
    LDLIBS +=  -lfltk_gl -lglut
     
    default : incremental
     
    # Generate intermediates variables and files ----------------------------------
    # update the makefiles on every compilation
    CXXFLAGS += -MMD
     
    # Create a lists of object and .d files to create - one for each source file in the directory
    DOTD := ${patsubst %${strip ${EXT}},%.d,${wildcard *${EXT}}}
    DOTO = ${DOTD:.d=.o}
     
    # make any non-existant make files (using the g++ preprocessor)
    ${DOTD} : %.d : %${EXT}
    	${CXX} ${CPPFLAGS} -MM $< > $@
     
    ifneq (${MAKECMDGOALS},clean)
    -include ${DOTD} # include the generated make files, which make the object files
    endif
     
    # Final targets ---------------------------------------------------------------
    .PHONY : clean incremental full
     
    full : clean incremental
     
    incremental : ${OUTPUT}
     
    clean :
    	rm -f *.o *~ *.d $(OUTPUT)
     
    ${OUTPUT} : ${DOTO}
    	mingw32-g++ -o $@ $^ ${LDFLAGS} ${LDLIBS}
    Quelqu'un saurait-il m'aider comment le rendre compatible sous vista? Faut-il modifier le makefile ou c'est eclipse qui pose problème?

    MERCI d'avance

  2. #2
    Membre émérite
    Avatar de white_tentacle
    Profil pro
    Inscrit en
    Novembre 2008
    Messages
    1 505
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2008
    Messages : 1 505
    Points : 2 799
    Points
    2 799
    Par défaut
    La source de tes maux :
    ..\framebuffer.h:16:19: FL/gl.h: No such file or directory
    Il faut que tu configures correctement ton INCLUDE_PATH (as-tu installé les libs de dev opengl, déjà ? )

  3. #3
    Expert confirmé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Décembre 2003
    Messages
    3 549
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Décembre 2003
    Messages : 3 549
    Points : 4 625
    Points
    4 625
    Par défaut
    Des fois il y a des flags pour le preprocesseur à passer pour utiliser certaines bibliothèques.

    Des commandes comme `pkg-config --cflags bibliothèque` fournissent ces informations, par exemple.
    `pkg-config --libs bibliothèque` quant à lui fournit la liste des bibliothèque à lier et leur chemin.

Discussions similaires

  1. compiler projet OpenGl with Cmake ou codeBlocks
    Par SuperPhenix dans le forum Systèmes de compilation
    Réponses: 0
    Dernier message: 27/12/2014, 20h34
  2. Réponses: 1
    Dernier message: 18/11/2012, 01h47
  3. problème compilation projet eclipse C++ opengl
    Par youp_db dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 23/04/2007, 11h34
  4. compilation Cg/OpenGL
    Par chonos dans le forum OpenGL
    Réponses: 10
    Dernier message: 03/01/2006, 16h23
  5. Erreur de compilation oavec OpenGL
    Par Cofondinde dans le forum MFC
    Réponses: 1
    Dernier message: 05/06/2005, 16h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo