From: "AndrewTek" Newsgroups: comp.os.msdos.djgpp Subject: Java JNI problems with GCC??? Lines: 59 X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Message-ID: Date: Thu, 30 Sep 1999 08:07:55 -0700 NNTP-Posting-Host: 206.170.125.15 X-Complaints-To: abuse AT pacbell DOT net X-Trace: typhoon-la.pbi.net 938703884 206.170.125.15 (Thu, 30 Sep 1999 08:04:44 PDT) NNTP-Posting-Date: Thu, 30 Sep 1999 08:04:44 PDT Organization: SBC Internet Services To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi all, Thanks for helping me to get my dll-creation programs set up. And thanks for helping me to get my include paths to work. Now I have a new problem which I hope is not off-topic. I get all kinds of wierd warnings from gcc when I try to include the jdk1.1.6/include folder. Here is the commandline argument I am calling to compile: gcc -Zwin32 -Wall -c -o hello.dll hello.c -IH:\jdk1.1.6\include -IH:\jdk1.1.6\include\win32 Here is a small sampling: (I haven't yet found a way to capture the output into a log file): H:/jdk1.1.6/include/jni.h:1752: warning: data definition has no type or storage class H:/jdk1.1.6/include/jni.h:1765: parse error before `*' H:/jdk1.1.6/include/jni.h:1765: warning: no semicolon at end of struct or union H:/jdk1.1.6/include/jni.h:1767: parse error before `*' H:/jdk1.1.6/include/jni.h:1770: parse error before `*' H:/jdk1.1.6/include/jni.h:1793: parse error before `JNI_GetDefaultJavaVMInitArgs' H:/jdk1.1.6/include/jni.h:1793: warning: type defaults to `int' in declaration of `JNI_GetDefaultJavaVMInitArgs' H:/jdk1.1.6/include/jni.h:1793: warning: data definition has no type or storage class H:/jdk1.1.6/include/jni.h:1795: parse error before `JNI_CreateJavaVM' H:/jdk1.1.6/include/jni.h:1795: warning: type defaults to `int' in declaration of `JNI_CreateJavaVM' H:/jdk1.1.6/include/jni.h:1795: warning: data definition has no type or storage class H:/jdk1.1.6/include/jni.h:1797: parse error before `JNI_GetCreatedJavaVMs' H:/jdk1.1.6/include/jni.h:1797: warning: type defaults to `int' in declaration of `JNI_GetCreatedJavaVMs' H:/jdk1.1.6/include/jni.h:1797: warning: data definition has no type or storage class And here is the c Code: #include #include #include "JNIHelloWorld.h" JNIEXPORT void JNICALL Java_JNIHelloWorld_displayHelloWorld(JNIEnv *env, jobject obj){ printf("Hello World!"); return; } Does anyone have any suggestions? Are there any special header files I need to use JNI with GCC? Thanks for any help. Grace always, Andrew