Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Oct 1999 23:59:23 -0600
From:      "Mark J. Sommer" <msommer@argotsoft.com>
To:        freebsd-java@freebsd.org
Subject:   Re: JNI
Message-ID:  <3.0.3.32.19991006235923.009ca830@mail>
In-Reply-To: <Pine.GSO.3.96.991006222144.20458A-100000@isis>

next in thread | previous in thread | raw e-mail | index | archive | help
Try:

gcc -I/usr/local/bin/jdk1.1.8/include -I/usr/local/bin/jdk1.1.8/include/freebsd -Wall -pipe -shared -c ...

Think you're missing the -shared.  JNI works fine for me on FreeBSD.
At 10:28 PM 10/6/99 -0500, you wrote:
>Im trying to run the example in Java tutorial about JNI, but im getting
>the message "unsupported file type (libNativeDemo.so)" when I run the java
>program that runs a native method.
>
>Im creating libNativeDemo.so with this line
>
> gcc -I/usr/local/bin/jdk1.1.8/include/   \
>-I/usr/local/bin/jdk1.1.8/include/freebsd -c   \
>-fPIC -DPIC NativeDemo.c -o libNativeDemo.so   
>
>any ideas?
>
>thanks in advance, 
>Sergio
>
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-java" in the body of the message
>
>

~Mark
--------------------------------------------------------------------------------
Mark J. Sommer      ARGOT Software Corporation,
P.O. Box 92020,     Albuquerque, New Mexico       87199-2020
FAX: 505-771-0274   PHONE: 505-867-6750           E-MAIL: msommer@argotsoft.com



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?3.0.3.32.19991006235923.009ca830>