Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
well after having a quick look at that site it seems to be very windows orientated, and even if i select standard C/C++ a lot of the code is still dependant on non-standard libraries for example graphics.h from borland. if there is a particular piece of code from there you wish to compile please feel free to post a link to it and im sure someone here will try to help you.
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
I run this code in Linux with gcc filename.c and doesnt works, what coul be the problem?
#include <stdio.h>
#include <conio.h> //for getch();
#include <graphics.h>//for graphics
void main ()
{
int dirver, mode ;
int x1=0 , y1=0; //for line
int x2=199 , y2=199; // for line
int xC=100 , yC=100; // for circle
int radius=90; //radius of the circle
dirver = DETECT; // detecting the driver of VGA automatic
initgraph (&dirver , &mode , "c:\tc\bgi"); // initilizing graph
line (x1,y1,x2,y2);
circle (xC, yC, radius) ;
getch();
closegraph(); //closing graph
}
the graphics.h library was provided by borland and microsoft in the early 90s....do you have this? that library is only packed with borland 4 and earlier..
i dont know, but this may help
so the long and short of it is, is that graphics.h is not standard C, so maybe you could check out ggi (libGII)
Gerardoj, please try to start providing some useful information. you have a program there, which clearly has some sort of error when it doesn't work, yet you never actually provide any useful information... if you want solutions you've got to help yourself first....
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.