delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/22/05:47:07

From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with RHIDE 1.4 and PDcurse 2.2
Date: Mon, 22 Dec 1997 10:10:09 +0100
Organization: none provided
Lines: 55
Message-ID: <349E2E71.F6833AE5@gmx.net>
References: <349da48d DOT 6046332 AT nntp DOT ix DOT netcom DOT com>
NNTP-Posting-Host: isdn80.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thomas Likens schrieb:
> 
> command-line make file compiles and links correctly with the following
> order:
> 
> gcc  program.o  -lcurso -o program.exe -Lc:/djgpp/contrib/pdcurs22/lib
> 
> But regardless of how I manipulate the various menu options regarding
> both the linker and the compiler RHIDE invokes it as:
> 
> gcc -Lc:/djgpp/contrib/pdcurs22/lib  -Xlinker -lcurso -o program.exe
> program.o
> 
> Even with some manipulation I can only get
> 
> gcc   -Xlinker -lcurso -Lc:/djgpp/contrib/pdcurs22/lib -o program.exe
> program.o
> 
> Both of these last variations cause the linker to fail because it
> can't resolve the references to the curses functions in the program.

That´s clear, since the GNU linker is a one-pass-linker and it
sees at first the library and _after_ this the object file, which needs
functions from the library but now the linker has forgotten the
library.

> Does anyone know a workaround for this or a simple setting inside of
> RHIDE that I am missing.  I would really like to get this going inside
> the IDE.

Of course I know. Your fault is, that you have placed the the -lcurso
option
in the "Options/Linker options", but this entry should be used _only_
for some special options which you want to to pass to the linker (like
-s or --cref or ...). To tell RHIDE to link in your program a library
there
is an other menu entry with a very "confusing" :-) name
"Options/Libraries".
Simply add there in an empty line (propably the first) your library name
(without the lib and the .a), in your case only curso, and then turn
the checkbox before it on. Now it should work.

The commandline which RHIDE uses now to link your program should be

gcc -Lc:/djgpp/contrib/pdcurs22/lib -o program.exe program.o -lcurso

Robert
-- 
******************************************************
* email:   Robert Hoehne <robert DOT hoehne AT gmx DOT net>     *
* Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW:     http://www.tu-chemnitz.de/~sho/rho        *
******************************************************


- Raw text -


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