From owner-freebsd-java Thu Jul 29 9:41:49 1999 Delivered-To: freebsd-java@freebsd.org Received: from bahay.rn.byu.edu (bahay.rn.byu.edu [128.187.221.77]) by hub.freebsd.org (Postfix) with ESMTP id 80FEB14E9B for ; Thu, 29 Jul 1999 09:41:38 -0700 (PDT) (envelope-from larsene@bahay.rn.byu.edu) Received: from bahay.rn.byu.edu (localhost [127.0.0.1]) by bahay.rn.byu.edu (8.9.3/8.9.2) with ESMTP id KAA01283; Thu, 29 Jul 1999 10:39:31 -0600 (MDT) (envelope-from larsene@bahay.rn.byu.edu) Message-ID: <37A083C3.1AFF7BB7@bahay.rn.byu.edu> Date: Thu, 29 Jul 1999 10:39:31 -0600 From: "E. Scott Larsen" X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Gunther Schadow Cc: freebsd-java@FreeBSD.ORG Subject: Re: jni References: <199907291636.LAA28005@aurora.rg.iupui.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org BINGO!!! Thanks. That both works well and makes sense. I appreciate your help. Thanks again. -Scott Gunther Schadow wrote: > Scott, > > you are missing _pure_virtual() which is part of the core gcc library > (/usr/lib/libgcc). BTW it's only needed for C++ and is an error > handler for a call to a function declared in an abstract class that > has no implementation. > > I usually circumvent these problems of missing references in shared > libraries by not relying on GCC/G++ to do the work for me. Instead I > am compiling to *.so files with "-fPIC -c" and then I use -ld to have > contol over the link step, so as to include any extra library that I > need. Actually, when I first did shared libraries on FreeBSD the GCC > -shared support never worked for me, but ld -Bshareable was always > fine. > > For example, the following is a snippet of my Makefile that builds a > JNI wrapper around GDBM. > > libjdbm.so: jdbm_Database.o > ld -Bshareable -o $@ jdbm_Database.o -L/usr/local/lib -lgdbm > > jdbm_Database.o: jdbm_Database.c > gcc -O2 -fpic -I/usr/local/include -c jdbm_Database.c > > This works for me. In your case, you need to make sure that -lgcc is > linked to your .so file. > > In earlier times I have used the true partial link feature of ld (see > ld(1) option -r) to resolve dependencies early when building a > library. That's a nice feature when you want to distribute a library > but you want to avoid your clients to bother with all the billions of > dependent libraries (Have you ever linked against an Oracle 7 library? > then you know what I mean.) > > hope this helps, > -Gunther > > Gunther Schadow ----------------------------------- http://aurora.rg.iupui.edu > Regenstrief Institute for Health Care > 1001 W 10th Street RG5, Indianapolis IN 46202, Phone: (317) 630 7960 > schadow@aurora.rg.iupui.edu ---------------------- #include > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message