Hello everybody!
I'm still new here and I began to use C::B only few weeks ago. But I have a big problem: when I try to run my graphical code, C::B gives the following error message:
Process terminated with status -1073741819 (0 minute(s), 7 second(s))What means this and how can I solve this problem?
My code is the follow in C++:
#include <math.h>
#include <graphics.h>
int main() {
const unsigned XMAX = 1200, YMAX = 500;
initwindow(XMAX, YMAX, "First Sample");
//printf("window: %u %u\n", getmaxx(), getmaxy());
circle(100, 50, 40);
line(0, 0, getmaxx(), getmaxy());
putpixel(10, 20, GREEN);
rectangle(0, 0, getmaxx(), getmaxy());
ellipse(200, 200, 90, 180, 100, 50);
while (!kbhit())
delay(200);
closegraph();
return 0;
}
I added the graphics.h file as follow: right click on it in Management tab/Projects and Add files. Is this correct? Previously I added in the Linker Settings:
-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32
and the way to libbgi.a.
But I don't know that these lines are needed to graphical works or adding graphics.h is enough to this? (Unfortunatelly I don't know the meaning of these 6 lines.)
Somebody can explain that how should I set the graphics mode in C::B with various graphical tools (BGI, SDL, SFML)? Is it enough to attach the graphics.h in the Management tab or I need to always add those 6 lines too?