Step #1.Install the following in Synaptic Package Manager
- libsdl-image1.2
- libsdl-image1.2-dev
- guile-1.8-dev
- guile-1.8
Step #2. Download and install libgraph then
- ./configure
- sudo make
- sudo make install
Step #3 Include graphics.h in your C program . Initialize the graphics system by
Step #4 you need to copy all the libgraph shared files from /usr/local/lib to /usr/lib
Now Compile the program using following command : gcc filename.c -lgraph
Enjoy !!!!
- int gd=DETECT, gm=VGAMAX;
- initgraph(&gd, &gm, NULL);
Step #4 you need to copy all the libgraph shared files from /usr/local/lib to /usr/lib
- sudo cp /usr/local/lib/libgraph.* /usr/lib
Now Compile the program using following command : gcc filename.c -lgraph
Enjoy !!!!
very useful...
ReplyDeleteroot@jec-WIV59605-0002:~/libgraph-1.0.2# sudo make
ReplyDeletemake: *** No targets specified and no makefile found. Stop.
I don't know what to do..
Please help!!!
I'm getting below error. Please let me know if there is any solution for this.
ReplyDelete[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
a.out: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Very tankful to you for such a nice effeort
ReplyDelete[root@localhost Desktop]# ./a.out
ReplyDeleteThe font has not been loaded!
what i do?
Thank you so much. It's really good for me. It should be better if you add more explanation for each step.
ReplyDeleteIt's not working in Ubuntu 14.04. Please help!
ReplyDeleteAfter compiling my code, I get following error
/tmp/cck8KKwR.o: In function `main':
line.c:(.text+0x13): undefined reference to `grprintf'
line.c:(.text+0x29): undefined reference to `grscanf'
line.c:(.text+0x38): undefined reference to `grprintf'
line.c:(.text+0x4e): undefined reference to `grscanf'
line.c:(.text+0x5d): undefined reference to `grprintf'
line.c:(.text+0x73): undefined reference to `grscanf'
line.c:(.text+0x82): undefined reference to `grprintf'
line.c:(.text+0x98): undefined reference to `grscanf'
line.c:(.text+0xab): undefined reference to `detectgraph'
line.c:(.text+0xc3): undefined reference to `initgraph'
line.c:(.text+0x16f): undefined reference to `putpixel'
line.c:(.text+0x19e): undefined reference to `delay'
line.c:(.text+0x1b2): undefined reference to `grgetch'
line.c:(.text+0x1b7): undefined reference to `closegraph'
collect2: error: ld returned 1 exit status
muchas gracias me sirvio de mucho
ReplyDeleteClick for all euro 2016 updates euro cup 2016
ReplyDelete