www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/18/14:02:05

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: grx20.zip - undefined references.
Date: Tue, 18 Nov 1997 19:16:12 +0100
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 44
Message-ID: <3471DB6C.74FDE993@LSTM.Ruhr-UNI-Bochum.De>
References: <3471B05D DOT 7169BCCE AT rug DOT ac DOT be>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Geert Pante wrote:
> 
> I recently installed the wonderful DJGPP distribution on my computer and
> I tried to program some graphics, so I unpacked grx20.zip, and set the
> right env-variables, but no test survived the linker: at least, gcc
> compiled without errors, but when I tried to make an executable, or when
> I ran the makefiles a whole bunch of undefined references showed up.  I
> attached a sample to this mail: I took modetest.c, because the
> pre-compiled version in the distribution works.  The errors I recived, I
> redirected them to the attached modetest.err.
> 
> What did I do wrong?
Somehow libgrx.a isn't linked in. Something like this should work (from
memory, so take care)
gcc  -I../include -L../lib -o modetest.exe modetest.c -lgrx
-I tells the compiler to search for the include files in
../include, -L tells the linker to search libraries in ../lib,
-l tells him to link in libgrx.a
I put the .h files into 
${DJGPP}/include/grx
and change the #includes to
#include <grx/whatever_i_need.h>
and
libgrx.a 
into ${DJGPP}/lib

What would have been nice are the commandline you tried plus
-v for verbose, and send that and it's output to the list.


-- 
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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