delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/14/05:09:44

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <007801c1cb40$0b55c380$60e15ecb@u4v4b7>
From: "Amish K. Munshi" <amishmunshi AT yahoo DOT com>
To: <djgpp AT delorie DOT com>
Subject: Graphics
Date: Thu, 14 Mar 2002 15:32:43 +0530
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_0057_01C1CB6D.7C4A4340
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

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;
       =20
        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.

    Thanks.



Bye.




------=_NextPart_000_0057_01C1CB6D.7C4A4340
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; I am a newbie to graphics =
programming and=20
wanting to use DJGPP for my graphics programming. I want to know if =
someone can=20
just help me and write to me a simple program which can bascially plot a =
pixel=20
on the screen, I should be able to manage with the algorithms=20
myself.</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; I have done my programs in TC and =
used the=20
following to plot points.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>#include &lt;graphics.h&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>void main()</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int =
gd,gm;</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
detectgraph(&amp;gd,&amp;gm);</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
initgraph(&amp;gd,&amp;gm,"d:\\tc\\bgi");</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
putpixel(10,10,RED);</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
closegraph();</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; I have done this sucessfully. I =
want to=20
know which files need to be included for DJGPP compiler. I have written =
the=20
following program refering to the documentation, but it is not compiling =
giving=20
an error c:\windows\temp\cccqjeyh(.text+0x13):temp.c: undefined =
reference to=20
'detectgraph'</FONT></DIV>
<DIV><FONT size=3D2>and similarly for initgraph putpixel __gr_INIT and=20
__gr_restcecrtmode.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>
<P>#include &lt;stdio.h&gt;</P>
<P>#include &lt;libbcc.h&gt;</P>
<P>int main()</P>
<P>{</P>
<P>int gd,gm;</P>
<P>detectgraph(&amp;gd,&amp;gm);</P>
<P>initgraph(&amp;gd,&amp;gm,"");</P>
<P>putpixel(100,100,55);</P>
<P>closegraph();</P>
<P>return 0;</P>
<P>}</P></FONT></DIV></FONT></DIV>
<DIV><FONT size=3D2>
<P>&nbsp;&nbsp;&nbsp; Plese let me know what am I doing wrong.</P>
<P>&nbsp;&nbsp;&nbsp; Thanks.</P>
<P>&nbsp;</P>
<P>Bye.</P>
<P>&nbsp;</P></FONT></DIV></BODY></HTML>

------=_NextPart_000_0057_01C1CB6D.7C4A4340--


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019