delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/30/00:03:06

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Librarys
Date: Sun, 29 Jun 1997 19:48:15 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 30
Message-ID: <33B6BBFF.7D2F@cs.com>
References: <33B6BFCA DOT 4F18 AT xtra DOT co DOT nz>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp108.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hayden William Read wrote:
> 
> Hi
> I'm new at using C, C++, etc in any form, and I would like to know how
> you go about specifying which libarys for DJGPP to use.  I know how to
> use Include files, but i'm not sure about Librarys.  Could someone
> please tell me how to use librarys.

Are you using the RHIDE editor/IDE or are you running DJGPP from the
command line?

In RHIDE, you specify libraries to link in the Libraries menu.  From the
command line, use the '-l<lib>' parameter.

In both cases, you need only specify the portion of the name between
"lib" and ".a".  For example, libc.a would be 'c' in RHIDE or '-lc' on
the command line, liballeg.a would be 'alleg' in RHIDE or '-lalleg' on
the command line.

libc.a is automatically linked in for all C and C++ programs.  For C++
programs, you must either specify '-lgpp' on the gcc command line, or
use gxx.exe which does this for you.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Money is truthful.  If a man speaks |
|       aka Fighteer I       | of his honor, make him pay cash."    |
|   mailto:fighteer AT cs DOT com   |                                      |
| http://www.cs.com/fighteer |               - Lazarus Long         |
---------------------------------------------------------------------

- Raw text -


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