* pthread error using JNI on Digital Unix
@ 2000-04-19 4:00 sdurrant
0 siblings, 0 replies; only message in thread
From: sdurrant @ 2000-04-19 4:00 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]
Hi,
I'm new to the Alpha world and am trying to use JNI.
I have the 'hello native world' example from
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
running fine on Solaris 2.7, JDK 1.1.8, and gcc-2.95.2.
However, using Digital Unix 4.0 D, JDK 1.1.8, and gcc-2.95.2 I am getting errors
concerning pthread.
But, because I am using g++ I don't have a -pthread option.
Is there a workaround for this?
Here are the specific errors I'm getting:
g++ -O -I/usr/opt/java118/include -I/usr/opt/java118/include/alpha
HelloNative.c -o libHelloNative.so
In file included from HelloNative.h:2,
from HelloNative.c:1:
/usr/opt/java118/include/jni.h:49: #error "Modules that interface with
Java must be compiled and linked with the -pthread option"
*** Exit 1
Stop.
The code from jni.h that is causing the error is:
47: /*** HDS add following error to ensure that users specify -pthread ***/
48: #ifndef _REENTRANT
49: #error "Modules that interface with Java must be compiled and linked with the -pthread option"
50: #endif
If I define _REENTRANT in the compile string I get the following error
g++ -O -I/usr/opt/java118/include -I/usr/opt/java118/include/alpha -D
_REENTRANT HelloNative.c -o libHelloNative.so
/usr/ucb/ld:
Unresolved:
main
collect2: ld returned 1 exit status
*** Exit 1
Stop.
--
-----------------------------------------------------------
Scott Durrant | ... send lawyers, guns
sdurrant@howard.genetics.utah.edu | and money ...
-----------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 2191 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-19 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-19 4:00 pthread error using JNI on Digital Unix sdurrant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox