Hey.
So i reacently had problems with graphics.h crashing my programm when i used initwindow.
I fixed it by using the version of my school.
Suprice! It worked. Only other problem is that i cant use readimagefile.
It trows up this error:
[code]
undefined reference to 'readimagefile'
if returned exit status 1
[/code]
my code:
[code]
//#include <iostream>
#include <graphics.h>
//using namespace std;
int main()
{
int gd = DETECT, gm;
int x = 320, y = 240, radius=100;
char s[10];
initgraph(&gd, &gm, "");
readimagefile("walk0001.gif",10,30,10,10);
}
[/code]
linker settings:
[IMG]https://i.gyazo.com/ef261de2bfbc3e7e88894bcf38b15c11.png[/IMG]
graphics.h : [url]http://134.255.217.111/graphics.h[/url]
_mingw.h : [url]http://134.255.217.111/_mingw.h[/url]
libbgi.a : [url]http://134.255.217.111/libbgi.a[/url]
[ALL THE FILES ARE HOSTED ON MY VSERVER]
Last thing:
Yes i do need to use graphics.h and yes i know it was made in 1979 and no i cant use anything else! I am planning on turining this in for a game project.
How can i fix this?
Please answer quickly
You may need to add the library to your linking path. -L (note the capital L) followed by whatever the path of the library is (if it's in lib/gfx/, then -L./lib/gfx/)
I think that's how paths work on windows, though I haven't developed on one in like 3 years so idk
[QUOTE=proboardslol;50009773]You may need to add the library to your linking path. -L (note the capital L) followed by whatever the path of the library is (if it's in lib/gfx/, then -L./lib/gfx/)
I think that's how paths work on windows, though I haven't developed on one in like 3 years so idk[/QUOTE]
Ive put it in the standart lib folder of my compiler so i dont think thats necessary :D
[QUOTE=proboardslol;50009773]You may need to add the library to your linking path. -L (note the capital L) followed by whatever the path of the library is (if it's in lib/gfx/, then -L./lib/gfx/)
I think that's how paths work on windows, though I haven't developed on one in like 3 years so idk[/QUOTE]
Or is it?
Sorry, you need to Log In to post a reply to this thread.