Problems with Java include files

Dr. rer. nat. R. Wester
Tue Apr 1 08:47:00 GMT 1997


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 

(I believe to understand why this does not work but curiously it works with 
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 

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

For help on using this list, send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list