Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <004001c2979c$d176a060$ab80869f@oemcomputer> Reply-To: "Al" From: "Al" To: Subject: gcc, cygwin, jni headers Date: Fri, 29 Nov 2002 11:45:27 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Ive seen one other post on this topic but there were no replies. Maybe Ill be more lucky. Im trying to compile a simple dll using gcc and cygwin. Something very similar to below used to work on dos and mingw but now Im geting loads of errors as gcc tries to compile some headers?! Below is my make file and the first few lines of the output. Please help. Its not that I should be using solaris versions of the Java headers (jni_md.h and jawt_md.h) is it? TIA. El. #### MAKEFILE #### JAVA_HOME = C:/Progra~1/java/jdk14~1.0 CC = gcc LD = gcc RM = rm SHELL = /bin/sh CFLAGS = -O #-v --save-temps CPPFLAGS = LDFLAGS = -I$(SRC_DIR) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 RMFLAGS = -f SRC_DIR = . SOURCES = \ $(SRC_DIR)/jvmpi1_1.c .PHONY: all all: jvmpi1_1.dll jvmpi1_1.dll: $(SOURCES) $(CC) -D_BUILD_DLL $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(SOURCES) -Wl,--kill-at %.d: %.c $(SHELL) -ec '$(CC) -MM $(CPPFLAGS) $< \ | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ [ -s $@ ] || rm $(RMFLAGS) $@' ifneq ($(MAKECMDGOALS), clean) ifneq ($(MAKECMDGOALS), cleanall) include $(SOURCES:.c=.d) endif endif .PHONY: clean cleanall clean: -$(RM) $(RMFLAGS) *.o *.d cleanall: clean -$(RM) $(RMFLAGS) *.exe *.dll #### OUTPUT #### gcc -D_BUILD_DLL -O -I. -IC:/Progra~1/java/jdk14~1.0/include -IC:/Progra~1 /jav a/jdk14~1.0/include/win32 -shared -o jvmpi1_1.dll ./jvmpi1_1.c -Wl,--kill-at In file included from C:/Progra~1/java/jdk14~1.0/include/jni.h:30, from jvmpi1_1.h:8, from ./jvmpi1_1.c:5: C:/Progra~1/java/jdk14~1.0/include/win32/jni_md.h:19: parse error before `jlong' C:/Progra~1/java/jdk14~1.0/include/win32/jni_md.h:19: warning: data definition h as no type or storage class In file included from jvmpi1_1.h:8, from ./jvmpi1_1.c:5: C:/Progra~1/java/jdk14~1.0/include/jni.h:111: parse error before `jlong' C:/Progra~1/java/jdk14~1.0/include/jni.h:111: warning: no semicolon at end of st ruct or union C:/Progra~1/java/jdk14~1.0/include/jni.h:115: parse error before `}' C:/Progra~1/java/jdk14~1.0/include/jni.h:115: warning: data definition has no ty pe or storage class C:/Progra~1/java/jdk14~1.0/include/jni.h:258: parse error before `jvalue' .... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/