Mail Archives: djgpp/1997/02/27/12:03:31
On Wed, 26 Feb 1997, John M. Aldrich wrote:
> 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.
To see which modules from which libraries are linked in, add -Wl,-t to
your gcc/gxx command line that you use to link the program. It will
cause the linker to print each module (both in .o object files and .a
libraries) that ld links into your program.
- Raw text -