Gee -static to create a shared .so file ? maybe u wanna look at -shared !
> > libHelloNative.so: HelloNative.c HelloNative.h
> > gcc -c -o libHelloNative.so \
> > -static \
> > -I/usr/java/include \
> > -I/usr/java/include/genunix \
> >
Make sure that:
#1: you're calling System.loadLibrary(someLib) [ I'm assuming you are ]
#2: when you compile your native library, you are exporting the symbols
you need to call from your Java program [ this was a real pain in the
butt on a Mac ]
Peter Gutowski wrote:
>
> I've used Cay Horstma
>libHelloNative.so: HelloNative.c HelloNative.h
> gcc -c -o libHelloNative.so \
> -static \
> -I/usr/java/include \
> -I/usr/java/include/genunix \
> HelloNative.c
>
You don't have the right compiler options here. In the ELF-HOWTO
(maintained by [EMAIL PROTECTED]), you find the following gui
Peter Gutowski wrote:
>
> I've used Cay Horstmann's and Gary Cornell "Core Java" books and have been
> pretty happy with them. The second volume claims to help you create native
> methods that can be called from java code. Their examples use Solaris and
> WindozNT only though..
>
> The instructi
You need to compile that as a shared library not a static lib. Use -shared
not -static on the command line.
Mo DeJong
dejong at cs.umn.edu
On Mon, 15 Feb 1999, Peter Gutowski wrote:
> I've used Cay Horstmann's and Gary Cornell "Core Java" books and have been
> pretty happy with them. The second
On Mon, 22 Jun 1998, Cho Hui Dae wrote:
> hi! can you help me? i have the following error whenever i run
> every programs included in linux jdk 1.1.6. what happened?
> first of all, i got "Segmentation fault" with libc library in
> jdk. so i removed it coz i have already installed the same versio