delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/29/08:45:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [195.92.67.70]
From: "Elfyn McBratney" <emcb_exposure AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: gcc, cygwin, jni headers
Date: Fri, 29 Nov 2002 13:44:57 +0000
Mime-Version: 1.0
Message-ID: <F87FdOw9CmLtBdr34Ec0001637d@hotmail.com>
X-OriginalArrivalTime: 29 Nov 2002 13:44:57.0358 (UTC) FILETIME=[8142F2E0:01C297AD]

Sorry i hust saw this on the net:

http://www.xraylith.wisc.edu/~khan/software/gnu-win32/README.jni.txt

Theres a bit about changing the header files, Maybe this will help.

Elfyn
elfyn AT exposure DOT org DOT uk

>Hi,
>
>>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?
>
>No. The windows headers should do just fine.
>
>TIA.
>>El.
>>
>>#### MAKEFILE ####
>>
>>JAVA_HOME = C:/Progra~1/java/jdk14~1.0
>
>Consider using a posix path to JAVA_HOME e.g. /cygdrive/c or whatever you 
>have mounted your c drive as. Also im not sure whether those squigglies 
>will cause you problems (???).
>
>JAVA_HOME = /cygdrive/c/java/jdk14~1.0
>
>>
>>CC = gcc
>
>Also use the GNU linker (ld), as im not sure whether this would work
>
>LD = ld
>
>>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/
>
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*. 
>http://join.msn.com/?page=features/featuredemail
>
>
>--
>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/


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019