delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/29/06:47:17

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
Message-ID: <004001c2979c$d176a060$ab80869f@oemcomputer>
Reply-To: "Al" <nobrow AT eircom DOT net>
From: "Al" <nobrow AT eircom DOT net>
To: <cygwin AT cygwin DOT com>
Subject: gcc, cygwin, jni headers
Date: Fri, 29 Nov 2002 11:45:27 -0000
MIME-Version: 1.0
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/

- Raw text -


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