From owner-freebsd-questions Sat Apr 24 17:21:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id 5F32A14DB0 for ; Sat, 24 Apr 1999 17:21:11 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id TAA24278; Sat, 24 Apr 1999 19:38:32 -0500 (EST) Date: Sat, 24 Apr 1999 19:38:31 -0500 (EST) From: Alfred Perlstein To: kip@lyris.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: FreeBSD linking against libc_r instead of libc In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 24 Apr 1999 kip@lyris.com wrote: > That keeps it from linking against the standard libraries -- > however, I am not sure how to add all the need libraries (libstdc++ etc.) > back in. Even when I try -L/path to libstdc++ libgcc etc./ -lstdc++ -lgcc > I get complaints of missing symbols eg. cout, __eh_alloc, etc. perhaps you > could give me an example where you use -nostdlib in linking a simple > program. Thanks again. ugh, i don't even know if this will work, but i got a c++ "hello world" to compile like so: g++ -nostdlib g.cpp /usr/lib/crt1.o /usr/lib/crti.o -lstdc++ -lm /usr/lib/crtbegin.o -lc_r -lgcc /usr/lib/crtend.o /usr/lib/crtn.o enjoy and i think order matters somewhat. -Alfred > -Kip > > On Sat, 24 Apr 1999, Alfred Perlstein wrote: > > > On Sat, 24 Apr 1999 kip@lyris.com wrote: > > > > > > > > > > I don't have egcs from the port available, but what you might want > > > > to try is combinations of -nostdlib and -lc_r until someone comes up > > ^^^^^^^^ > > yo! right here! ------------------/ > > > > > > with a real answer. Sorry i didn't see the 'egcs' in your question. > > > > > > > When I do -lc_r it links against both libc and libc_r. Is there any way to > > > tell it _not_ to link against libc, such that all linking is explicit? > > > > did you try that? > > > > -Alfred > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message