Bonjour,
Je souhaiterai mettre du graphisme très basique (carrés, rectangles, cercles...) dans un projet réalisé sous code blocks.
Sous Borland C++ 5, j'utilisais graphics.h, puis :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| int main(void)
{
int gdriver = DETECT, gmode, errorcode;
clrscr();
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "C:\\TC\\BGI");
/* 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); /* terminate with an error code */
}
closegraph();
} |
J'ai rajouté dans les includes de code blocks le graphics.h et _defs.h. A la compilation, j'ai une cinquantaine d'erreurs dont :
#error BGI graphics not ANSI compatible
Pouvez-vous m'indiquer une bibliothèque pour faire 2 ou 3 tracés géométrique ?
Merci d'avance, Guillaume.
Partager