printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
else cout<<"Graphics initialised!\n";
I have tried to compile it in Mingw, in Devc++, and in an old borland compiler. None of these work. The compilation works fine, but when I try to run the file I get something like this [Linker error] undefined reference to `initgraph' for all grahpic related functions.
I suspect it is a linking problem but I cannot figure how to get over it. I have tried writing -L"C:/Dev-Cpp/lib" in the linker command line, but didn't work.
If you were working on visual studios you could have linked the libraries the same way almost by going to project settings-> linker -> then add in the path to search for libraries at -> then input and add in the library file like d3d9.lib