Mail Archives: djgpp/2002/03/14/11:01:31
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f
|
From: | Maurice Lombardi <Maurice DOT Lombardi AT ujf-grenoble DOT fr>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Graphics
|
Date: | Thu, 14 Mar 2002 16:45:20 +0100
|
Organization: | Universite Joseph Fourier - Grenoble 1
|
Lines: | 95
|
Message-ID: | <3C90C590.1030209@ujf-grenoble.fr>
|
References: | <007801c1cb40$0b55c380$60e15ecb AT u4v4b7>
|
NNTP-Posting-Host: | knautie.ujf-grenoble.fr
|
Mime-Version: | 1.0
|
X-Trace: | rhone.ujf-grenoble.fr 1016120709 34928 152.77.252.196 (14 Mar 2002 15:45:09 GMT)
|
X-Complaints-To: | abuse AT ujf-grenoble DOT fr
|
NNTP-Posting-Date: | Thu, 14 Mar 2002 15:45:09 +0000 (UTC)
|
User-Agent: | Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1
|
X-Accept-Language: | fr-fr, it, en
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Amish K. Munshi wrote:
> Hi,
>
>
>
> I am a newbie to graphics programming and wanting to use DJGPP for
> my graphics programming. I want to know if someone can just help me and
> write to me a simple program which can bascially plot a pixel on the
> screen, I should be able to manage with the algorithms myself.
>
> I have done my programs in TC and used the following to plot points.
>
>
>
> #include <graphics.h>
>
>
>
> void main()
>
> {
>
> int gd,gm;
>
>
>
> detectgraph(&gd,&gm);
>
> initgraph(&gd,&gm,"d:\\tc\\bgi");
>
> putpixel(10,10,RED);
>
> closegraph();
>
> }
>
>
>
> I have done this sucessfully. I want to know which files need to be
> included for DJGPP compiler. I have written the following program
> refering to the documentation, but it is not compiling giving an error
> c:\windows\temp\cccqjeyh(.text+0x13):temp.c: undefined reference to
> 'detectgraph'
>
> and similarly for initgraph putpixel __gr_INIT and __gr_restcecrtmode.
>
>
>
>
>
> #include <stdio.h>
>
> #include <libbcc.h>
>
> int main()
>
> {
>
> int gd,gm;
>
> detectgraph(&gd,&gm);
>
> initgraph(&gd,&gm,"");
>
> putpixel(100,100,55);
>
> closegraph();
>
> return 0;
>
> }
>
> Plese let me know what am I doing wrong.
>
You need an emulation for DJGPP of the TP graphics system.
One good is GRX (plug in replacement AFAIK).
you will find it at
http://www.gnu.de/software/GRX/
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice DOT Lombardi AT ujf-grenoble DOT fr
- Raw text -