www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/26/23:20:38

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: default libraries
Date: Wed, 26 Feb 1997 22:13:07 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 28
Message-ID: <331525F2.5407@cs.com>
References: <3314D860 DOT 6AA8 AT mbnet DOT mb DOT ca>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp202.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Alex Demko wrote:
> 
> What default libraries (if any) get linked into my EXE, when I compile
> C++ (not C) programs? Is it still just libc.a or are any other libs
> being snuck (sp?) in?

Assuming that you use 'gxx' to compile, all you need to do to see what
libraries get linked in is to add the '-v' switch and examine the call
to ld.  FWIW, I think that all gxx adds is libgpp.a; unfortunately,
using any code from that library places your entire program under the
GNU GPL, which (among other things) requires you to distribute its
source code along with the program.  If you don't like this, you can try
manually invoking gcc, using just the '-liostream' and '-lstdcx'
libraries.  If you get any unresolved externals, then you have to either
link libgpp.a, or write your own versions of anything that you use from
it.

BTW, the standard C compilation links in both libc.a and libgcc.a.  Both
of those are completely free and don't put any requirements on your
programs.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


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