-
graphics.h link error
Hello all,
Im wondering if theres a guru out there that can figure this one out? I must admit I just pulled the last hair out of my head so im going else where? below is the problem
My code is
#include <graphics.h>
#include <iostream.h>
#include <conio.h>
void
main (void)
{
int driver, mode;
initgraph (&driver, &mode, "c:/graphics/graphics");
setbkcolor (1);
setcolor (4);
settextstyle (4, 0, 14);
outtext ("Graphics Test!!!!");
getche();
closegraph();
}
This will compile just fine but when i go to wright the .exe i am getting the following link error. I would appreciate the help!!
Linking...
gtest.obj : error LNK2001: unresolved external symbol _closegraph
gtest.obj : error LNK2001: unresolved external symbol _outtext
gtest.obj : error LNK2001: unresolved external symbol _settextstyle
gtest.obj : error LNK2001: unresolved external symbol _setcolor
gtest.obj : error LNK2001: unresolved external symbol _setbkcolor
gtest.obj : error LNK2001: unresolved external symbol _initgraph
Debug/gtest.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.
gtest.exe - 7 error(s), 0 warning(s)
Again Thx!!!!
-
#include <conio.c> /// ??? Does That Work?
-
Unfortunately no, I have conio.h included for safety sake but still not working Im thinking it has to do with either the internals of my graphics.h or my initgraph statement but I not to sure. Thank you however.
-
??
if you're using turbo,
go to options>linker>libraries>
then cross the "graphics" option
it, however showed no graphics error for me but the program did't run
try it hope you'll have better fate?!
just try it
-
The compiler was obsolete when this thread was alive - way back in 2001
Now it's just a farce - closed.