delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/06/21:04:07

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GNU, Graphics mode, how to?
Date: Sun, 07 Dec 1997 18:21:12 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 48
Message-ID: <348AE918.2472@cs.com>
References: <01bd0277$934b6ec0$443c63c3 AT none>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp227.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mark wrote:
> 
> but Rhide insists (quite absolutley) that the function GrSetMode, has not been
> defined, even though I have included the necesarry grx20.h files, and checked that
> they exist. I have several test programs which came with the grx library, and they all
> work fine. I've looked at the code, and copied most of it exactly, but alas, GrSetMode has
> still not been defined. Rhide tells me that I have a 'Undefined call to GrSetMode'.

Please note the error message.  "undefined reference to 'x'" is not an
error reported by the preprocessor (cpp), which handles #include
directives.  It is a message from the linker (ld), telling you that it
was unable to find code for GrSetMode() anywhere in the libraries that
it knows about.  To fix this, you must tell RHIDE to link the grx20
library, using the Options|Libraries menu.

I'm not sure how the GRX 2.0 test programs are compiled (via a
makefile?), but if you look closely at the commands used, you'll see the
'-lgrx20' parameter at the end of the link command line.  You have to
use this as well.

If this still doesn't work, make sure that the LIBRARY_PATH environment
variable in djgpp.env specifies the directory where libgrx20.a resides. 
You can either copy libgrx20.a into your %DJDIR%/lib directory, or
manually add %DJDIR%/contrib/grx20/lib to the LIBRARY_PATH.  I recommend
the latter, because it makes it easier to manage your libraries.

> Does anybody know what I've done wrong?
> Better still does anybody have any examples of getting graphics started,
> with the minimum of (simple) code, so that I might follow it and actually get the
> hang of this thing?

Well, you could look in GRX's source files for the code of the
GrSetMode() function... or search the mailing list archives at
http://www.delorie.com/djgpp/ for the several dozen or so times this
question has been answered already... or read chapter 10 of the DJGPP
FAQ (v2/faq210b.zip from SimTel or online at
http://www.delorie.com/djgpp/v2faq/), which tells you how to use
graphics in DJGPP.  :-)

hth

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "History does not record anywhere at |
|       aka Fighteer I       | any time a religion that has any     |
|   mailto:fighteer AT cs DOT com   | rational basis."                     |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


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