Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: sdurrant@howard.genetics.utah.edu
Subject: pthread error using JNI on Digital Unix
Date: 2000/04/19	[thread overview]
Message-ID: <38FE1662.C74FF756@howard.genetics.utah.edu> (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 --]

                 reply	other threads:[~2000-04-19  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox