Hey,
Ik heb een probleem .
Ik ben een boek aan het lezen over hoe in c++ leren programeren .
Nu moet ik glut proberen gebruiken .
Maar ik ben vast ik schrijf de ganse code op zoals het in het boek staat en nu komt het volgende probleem :
(het is wel Franse text maar voor de paar woordjes dat er staan is dat zeker niet erg eh ? )
Weet iemand hoe ik dat kan op lossen ?
Dat is de geschreve code :
Ik heb een probleem .
Ik ben een boek aan het lezen over hoe in c++ leren programeren .
Nu moet ik glut proberen gebruiken .
Maar ik ben vast ik schrijf de ganse code op zoals het in het boek staat en nu komt het volgende probleem :
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glFlush@0 référencé dans la fonction "void __cdecl GraphiqueAffichage(void)" (?GraphiqueAffichage@@YAXXZ)
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glMatrixMode@4 référencé dans la fonction "void __cdecl GraphiqueAffichage(void)" (?GraphiqueAffichage@@YAXXZ)
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glClear@4 référencé dans la fonction "void __cdecl GraphiqueAffichage(void)" (?GraphiqueAffichage@@YAXXZ)
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glClearColor@16 référencé dans la fonction "void __cdecl GraphiqueAffichage(void)" (?GraphiqueAffichage@@YAXXZ)
1>graphique.obj : error LNK2019: symbole externe non résolu _gluOrtho2D@32 référencé dans la fonction "void __cdecl GraphiqueRedim(int,int)" (?GraphiqueRedim@@YAXHH@Z)
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glLoadIdentity@0 référencé dans la fonction "void __cdecl GraphiqueRedim(int,int)" (?GraphiqueRedim@@YAXHH@Z)
1>graphique.obj : error LNK2019: symbole externe non résolu __imp__glViewport@16 référencé dans la fonction "void __cdecl GraphiqueRedim(int,int)" (?GraphiqueRedim@@YAXHH@Z)
(het is wel Franse text maar voor de paar woordjes dat er staan is dat zeker niet erg eh ? )
Weet iemand hoe ik dat kan op lossen ?
Dat is de geschreve code :
Code:
#include <stdio.h>
#include <stdlib.h>
#include <windows.h
#include "GL/glut.h"
void graphique() {
glutInitWindowPosition(10, 10);
glutInitWindowSize(640, 480);
glutInitDisplayMode(GLUT_RGBA | GLUT_SINGLE);
glutCreateWindow("Graphique");
}
void GraphiqueAffichage() {
glClearColor(1.0, 1.0, 1.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glFlush();
}
void GraphiqueRedim(int x, int y) {
glViewport(10, 10, x-20, y-20);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 100.0, 0.0, 100.0);
}
void start_graphique() {
glutDisplayFunc(GraphiqueAffichage);
glutReshapeFunc(GraphiqueRedim);
glutMainLoop();
}
void main(void) {
start_graphique();
}