Date: Wed, 17 Apr 1996 12:16:51 -0700 (PDT) From: "Eric J. Schwertfeger" <ejs@bfd.com> To: Warner Losh <imp@village.org> Cc: hackers@FreeBSD.org Subject: Re: How to make g++ shared libraries? Message-ID: <Pine.BSF.3.91.960417120419.10693A-100000@harlie.bfd.com> In-Reply-To: <199604171831.MAA02678@rover.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Apr 1996, Warner Losh wrote: > : I'm trying to create a shared version of the Cvo (Cray Visual Objects) > : c++ library, but it isn't working. > > Are you linking the library is gcc or g++? Also, where does one get > cvo? It sounds kinda like something that I used to work on :-) Ah, this is what John Polstra <jdp@polstra.com> pointed out. > You must include "/usr/lib/c++rt0.o" near the front of your "ld" command > line when creating C++ shared libraries. E.g., As for where, Paul Borman <prb@bsdi.com> is maintaining the following > You can pick up > > ftp://ftp.krystal.com/pub/Cvo.1.0.2.README > ftp://ftp.krystal.com/pub/Cvo.1.0.2.src.pax.gz > ftp://ftp.krystal.com/pub/Cvo.1.0.2.doc.pax.gz You will need to add the following to Cvo/_Machine.h++ (I did it right after the linux section). #if defined(__FreeBSD__) #define __SIGNAL_RETURN_INT__ #define __NEED_SELECT_DEF__ #define __NEED_SYS_IOCTL__ #endif > g++ often does things that gcc won't do. You may also have found a > linker bug, but I could have sworn that global ctors in shared > libraries were called on FreeBSD. Not the case, the above fixed the problem > I had OI running on FreeBSD before > we went through and gutted all the global objects that needed global > ctors due to other OSes being somewhat brain damaged wrt shared c++ > libraries. Is there a free OI kit for FreeBSD? I've heard good things about it, and would like to try it, but couldn't find it under ports. Since I'm still in the brushing up stage for C++ (long, agrivating story), and just learning Cvo, I'm quite open to change. Of course, I'm also not against doing a Cvo port myself, even if I do change over to OI.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960417120419.10693A-100000>