salut,
ton problème réside dans le fait que tu n'indiques pas au compilateur où trouver le mode vga ou ega..
il faut lui donner le chemin c:\\tc\\bgi" pour turbo c++
initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
de plus si c'est la version windows de Borland 4.5 il y a un problème avec inclusion de graphics.h
error BGI graphics not supported under Windows
cmarsc ;-)
-------------------------------
Réponse au message :
-------------------------------
J'utilise l'ide Borland 4.5 et je souhaite faire du graphisme.
Mon problème et que lorsque je compile l'exemple borland ci dessous,
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
/* request autodetection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg (errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
/* draw a line */
line(0, 0, getmaxx(), getmaxy());
/* clean up */
getch();
closegraph();
return 0;
}
j'obtiens le message suivant :
Linker Error: Undefined symbol _closegraph in module GRAPH.CPP
Linker Error: Undefined symbol _line in module GRAPH.CPP
Linker Error: Undefined symbol _getmaxx in module GRAPH.CPP
Linker Error: Undefined symbol _getmaxy in module GRAPH.CPP
Linker Error: Undefined symbol _grapherrormsg in module GRAPH.CPP
Linker Error: Undefined symbol _graphresult in module GRAPH.CPP
Linker Error: Undefined symbol _initgraph in module GRAPH.CPP
de même sous dos avec TC3.
Pouvez vous m'expliquer quel est le problème et m'aider à le resoudre...
Je vous remerci 