Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 10:39:31 -0600
From:      "E. Scott Larsen" <larsene@bahay.rn.byu.edu>
To:        Gunther Schadow <gunther@aurora.rg.iupui.edu>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: jni
Message-ID:  <37A083C3.1AFF7BB7@bahay.rn.byu.edu>
References:  <199907291636.LAA28005@aurora.rg.iupui.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <usual/disclaimer>
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37A083C3.1AFF7BB7>