Subject: Problems with Java include files
From: [email-masked] ("Dr. rer. nat. R. Wester")

1 Apr 1997 10:27:30 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7BIT
X-ENV: (mailgw1.fhg.de) [email-masked] -> [email-masked]
Comments: Authenticated sender is <[email-masked]>
Original-To: [email-masked]
X-Mailer: Pegasus Mail for Win32 (v2.42a)
Original-Sender: [email-masked]

Hi,

I would like to call C/C++  functions via the Java Native Interface. 
I tried to build the dll  which is necessary for that with  
gnu-win32. But unfortunately gnu-win32 seems not to like the Java 
include files (Sun's Java JDK 1.1) . 

In the include file /java/include/ win32/typedefs_md.h
the statement:

#define INT_OP(x,op,y)  (((#@op=='/')||(#@op=='%')) ?   \
                                             ( (((x)==0x80000000)&&((y)==-1)) ?            \
                                                  ((x) op 1) :  \     
                                                   ((x) op (y))) :  \
                                            ((x) op (y)))

produces the error message:
    typedefs_md.h:67: '#' operator is not followed by a macro 
                  argument                                                     

(I believe to understand why this does not work but curiously it works with 
MVC++)
When changing #@op to @op there is no such message any more
but then the lines 37 and 38:    

typedef    __int64	int64_t;
typedef unsigned __int64 uint64_t;

lead to the error messages 
    typedefs_md.h:37: syntax error befor ';'
    typedefs_md.h:38: syntax error befor ';'

At this point __int64 has not been defined, but should have been 
defined.

I already build a dll for JNI invocation with MVC++ and this worked 
but I would prefer to do it with gnu-win32. I would be very 
appreciative for any help on that problem.

Rolf  Wester
[email-masked]

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".