Shaihuld
Messages postés30Date d'inscriptionvendredi 15 août 2003StatutMembreDernière intervention20 juillet 2008
-
1 nov. 2004 à 14:50
lilington
Messages postés158Date d'inscriptionsamedi 31 janvier 2004StatutMembreDernière intervention12 mars 2009
-
29 avril 2005 à 09:59
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
entity666
Messages postés13Date d'inscriptionlundi 17 février 2003StatutMembreDernière intervention22 novembre 2007 22 avril 2005 à 11:54
ah vi c deja mieux mais je suis encore undef pour glut :
Compilateur: Default compiler
Building Makefile: "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win"
Exécution de make...
make.exe -f "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win" all
g++.exe main.o -o "openGL1.exe" -L"C:/Dev-Cpp/lib" -lopengl32 -lglu32 -lglut32 -lglut
main.o(.text+0x14b):main.cpp: undefined reference to `glutInit'
main.o(.text+0x158):main.cpp: undefined reference to `glutInitDisplayMode'
main.o(.text+0x16d):main.cpp: undefined reference to `glutInitWindowSize'
main.o(.text+0x182):main.cpp: undefined reference to `glutInitWindowPosition'
main.o(.text+0x192):main.cpp: undefined reference to `glutCreateWindow'
main.o(.text+0x1a7):main.cpp: undefined reference to `glutDisplayFunc'
main.o(.text+0x1af):main.cpp: undefined reference to `glutMainLoop'
make.exe: *** [openGL1.exe] Error 1
Exécution terminée
mais le schmilblick a avancé lol
lilington
Messages postés158Date d'inscriptionsamedi 31 janvier 2004StatutMembreDernière intervention12 mars 2009 22 avril 2005 à 02:25
ben j'ai trouvé ça par la gentielle d'un gentil espagnol qui luttait avec le francais. grossomodo la deuxieme ligne #difine... doit être inscrite sous devc++ et ça passe
entity666
Messages postés13Date d'inscriptionlundi 17 février 2003StatutMembreDernière intervention22 novembre 2007 13 avril 2005 à 17:26
en gros j'ai le même probleme que toi... je travaille sous devcpp j'ai bien linke les lib avec -lopengl32 -lglu32 -lglut32
j'ai meme essaye de mettre un -lglu en plus ... mais rien n'y fait ! pas moyen de linker c vraiment bizzare et le log me dit :
Compilateur: Default compiler
Building Makefile: "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win"
Exécution de make...
make.exe -f "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
main.o(.text+0xf):main.cpp: undefined reference to `_imp__glClearColor'
main.o(.text+0x21):main.cpp: undefined reference to `_imp__glMatrixMode'
main.o(.text+0x2b):main.cpp: undefined reference to `_imp__glLoadIdentity'
main.o(.text+0x56):main.cpp: undefined reference to `_imp__glOrtho'
main.o(.text+0x71):main.cpp: undefined reference to `_imp__glClear'
main.o(.text+0x87):main.cpp: undefined reference to `_imp__glColor3f'
main.o(.text+0x96):main.cpp: undefined reference to `_imp__glBegin'
main.o(.text+0xaf):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xc8):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xe1):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xfa):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0x104):main.cpp: undefined reference to `_imp__glEnd'
main.o(.text+0x10b):main.cpp: undefined reference to `_imp__glFlush'
main.o(.text+0x16b):main.cpp: undefined reference to `glutInit'
main.o(.text+0x178):main.cpp: undefined reference to `glutInitDisplayMode'
main.o(.text+0x18d):main.cpp: undefined reference to `glutInitWindowSize'
main.o(.text+0x1a2):main.cpp: undefined reference to `glutInitWindowPosition'
main.o(.text+0x1b2):main.cpp: undefined reference to `glutCreateWindow'
main.o(.text+0x1c7):main.cpp: undefined reference to `glutDisplayFunc'
main.o(.text+0x1cf):main.cpp: undefined reference to `glutMainLoop'
make.exe: *** [openGL1.exe] Error 1
Exécution terminée
En gros je suis en plein dans l'undef ... alors que tout est bien defini dans l'editeur de liens et que glut est parfaitement installé (verifié 5 x de suite l'installation...)
j'ai meme copie la dll glut32.dll dans mon rep windows , windows/system et windows/system32/ les 3 !
alors je vois pas ce que je peux faire de plus là ...
lilington
Messages postés158Date d'inscriptionsamedi 31 janvier 2004StatutMembreDernière intervention12 mars 2009 12 févr. 2005 à 11:45
j'ai des erreurs au niveau du linker . par ailleur je n'arrive a lancer aucune sources ni vac devc++4.9.9.0 ni avec vc++6.0
une solution pour moi ?
Shaihuld
Messages postés30Date d'inscriptionvendredi 15 août 2003StatutMembreDernière intervention20 juillet 2008 1 nov. 2004 à 14:54
HUM dsl je vien de dire une petite bétise
glVertex2f(-0.5, -0.5); // glVertex2f( GLfloat x, GLfloat y );
au lieu de glVertex3f(float x, float y);
Shaihuld
Messages postés30Date d'inscriptionvendredi 15 août 2003StatutMembreDernière intervention20 juillet 2008 1 nov. 2004 à 14:50
glVertex3f(0.25,0.25,0.0); // Coordonnées 1 (x = 0.25, y = 0.25) |
glVertex3f(0.75,0.25,0.0); // Coordonnées 2 (x 0.75, y 0.25) |
glVertex3f(0.75,0.75,0.0); // Coordonnées 3 (x 0.75, y 0.75) |
glVertex3f(0.25,0.75,0.0); // Coordonnées 4 (x 0.25, y 0.75) |
pourquoi t' enuyer a te trainer une valeur de z si elle vqut 0 ??? glVertex3f(float x, float y); n' est pas mieu ??
29 avril 2005 à 09:59
#include <windows.h>
#define GLUT_DISABLE_ATEXIT_HACK
#include <gl/gl.h>
#include <gl/glut.h>
#include <stdlib.h>
static GLfloat spin = 0.0;
char dir=1;
void myglInit(int L,int l,int pd,int pa,char *name,unsigned int mode );
void Init(void);
void display(void);
void spinDisplay();
void reshape(int w, int h);
void souris(int button,int etat,int x,int y);
int main (int argc,char** argv)
{
glutInit(&argc,argv);
myglInit(1024,768,0,0,"rotation",GLUT_DOUBLE|GLUT_RGB);
Init();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(souris);
glutMainLoop();
return 0;
}
void Init(void)
{
glClearColor(0.0,0.0,0.0,0.0);
glShadeModel(GL_FLAT);
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glRotatef(spin,0.0,0.0,1.0);
glColor3f(0.9,0.9,1.0);
glRectf(-25.0,-25.0,25.0,25.0);
glPopMatrix();
glutSwapBuffers();
}
void spinDisplay()
{
if (dir==1)
{
spin+=2.0;
if(spin>360.0)
spin-=360.0;
}
else
{
spin-=2.0;
if(spin <-360.0)
spin+=360.0;
}
glutPostRedisplay();
}
void reshape(int w, int h)
{
glViewport(0,0,w,h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity();
glOrtho(-50.0,50.0,-50.0,50.0,-1.0,1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void souris(int button,int etat,int x,int y)
{
switch (button)
{
case GLUT_LEFT_BUTTON :
if (etat==GLUT_DOWN)
dir=1;
glutIdleFunc(spinDisplay);
break;
case GLUT_RIGHT_BUTTON :
if (etat==GLUT_DOWN)
dir=2;
glutIdleFunc(spinDisplay);
break;
case GLUT_MIDDLE_BUTTON:
if (etat==GLUT_DOWN)
glutIdleFunc(NULL);
break;
}
}
void myglInit(int L,int l,int pd,int pa,char *name,unsigned int mode )
{
glutInitDisplayMode(mode);
glutInitWindowSize(L,l);
glutInitWindowPosition(pd,pa);
glutCreateWindow(name);
}
22 avril 2005 à 11:54
Compilateur: Default compiler
Building Makefile: "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win"
Exécution de make...
make.exe -f "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win" all
g++.exe main.o -o "openGL1.exe" -L"C:/Dev-Cpp/lib" -lopengl32 -lglu32 -lglut32 -lglut
main.o(.text+0x14b):main.cpp: undefined reference to `glutInit'
main.o(.text+0x158):main.cpp: undefined reference to `glutInitDisplayMode'
main.o(.text+0x16d):main.cpp: undefined reference to `glutInitWindowSize'
main.o(.text+0x182):main.cpp: undefined reference to `glutInitWindowPosition'
main.o(.text+0x192):main.cpp: undefined reference to `glutCreateWindow'
main.o(.text+0x1a7):main.cpp: undefined reference to `glutDisplayFunc'
main.o(.text+0x1af):main.cpp: undefined reference to `glutMainLoop'
make.exe: *** [openGL1.exe] Error 1
Exécution terminée
mais le schmilblick a avancé lol
22 avril 2005 à 02:25
#define GLUT_DISABLE_ATEXIT_HACK
#include <gl/gl.h>
#include <gl/glut.h>
#include <stdlib.h>
ben j'ai trouvé ça par la gentielle d'un gentil espagnol qui luttait avec le francais. grossomodo la deuxieme ligne #difine... doit être inscrite sous devc++ et ça passe
13 avril 2005 à 17:26
j'ai meme essaye de mettre un -lglu en plus ... mais rien n'y fait ! pas moyen de linker c vraiment bizzare et le log me dit :
Compilateur: Default compiler
Building Makefile: "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win"
Exécution de make...
make.exe -f "C:\Documents and Settings\TTy\Mes documents\Mes Projets\C++\dev c++\openGL1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
g++.exe main.o -o "openGL1.exe" -L"C:/Dev-Cpp/lib" -lopengl32 -lglu32 -lglut32 -lglut
main.o(.text+0xf):main.cpp: undefined reference to `_imp__glClearColor'
main.o(.text+0x21):main.cpp: undefined reference to `_imp__glMatrixMode'
main.o(.text+0x2b):main.cpp: undefined reference to `_imp__glLoadIdentity'
main.o(.text+0x56):main.cpp: undefined reference to `_imp__glOrtho'
main.o(.text+0x71):main.cpp: undefined reference to `_imp__glClear'
main.o(.text+0x87):main.cpp: undefined reference to `_imp__glColor3f'
main.o(.text+0x96):main.cpp: undefined reference to `_imp__glBegin'
main.o(.text+0xaf):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xc8):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xe1):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0xfa):main.cpp: undefined reference to `_imp__glVertex3f'
main.o(.text+0x104):main.cpp: undefined reference to `_imp__glEnd'
main.o(.text+0x10b):main.cpp: undefined reference to `_imp__glFlush'
main.o(.text+0x16b):main.cpp: undefined reference to `glutInit'
main.o(.text+0x178):main.cpp: undefined reference to `glutInitDisplayMode'
main.o(.text+0x18d):main.cpp: undefined reference to `glutInitWindowSize'
main.o(.text+0x1a2):main.cpp: undefined reference to `glutInitWindowPosition'
main.o(.text+0x1b2):main.cpp: undefined reference to `glutCreateWindow'
main.o(.text+0x1c7):main.cpp: undefined reference to `glutDisplayFunc'
main.o(.text+0x1cf):main.cpp: undefined reference to `glutMainLoop'
make.exe: *** [openGL1.exe] Error 1
Exécution terminée
En gros je suis en plein dans l'undef ... alors que tout est bien defini dans l'editeur de liens et que glut est parfaitement installé (verifié 5 x de suite l'installation...)
j'ai meme copie la dll glut32.dll dans mon rep windows , windows/system et windows/system32/ les 3 !
alors je vois pas ce que je peux faire de plus là ...
12 févr. 2005 à 11:45
une solution pour moi ?
1 nov. 2004 à 14:54
glVertex2f(-0.5, -0.5); // glVertex2f( GLfloat x, GLfloat y );
au lieu de glVertex3f(float x, float y);
1 nov. 2004 à 14:50
glVertex3f(0.75,0.25,0.0); // Coordonnées 2 (x 0.75, y 0.25) |
glVertex3f(0.75,0.75,0.0); // Coordonnées 3 (x 0.75, y 0.75) |
glVertex3f(0.25,0.75,0.0); // Coordonnées 4 (x 0.25, y 0.75) |
pourquoi t' enuyer a te trainer une valeur de z si elle vqut 0 ??? glVertex3f(float x, float y); n' est pas mieu ??