Mail Archives: djgpp/1997/02/26/23:20:38
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 -