delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/12/11:57:55

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <004101bfec19$55b31340$2a2b7a35@bln.rt.daimlerchrysler.com>
From: "Horst Burmeister" <Horst DOT Burmeister AT DaimlerChrysler DOT com>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: still help needed regarding DLL for JNI
Date: Wed, 12 Jul 2000 17:52:06 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300

------=_NextPart_000_0038_01BFEC29.E4975340
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello all,

my task:=20
I have an UNIX-based C++ application that is used via a shared-object =
library=20
and JNI in Java on a Unix machine.
Now I want to make a dll library from this application using cygwin gnu =
tools=20
and use this dll using JNI in Java under NT.

To test this way of porting the software to NT I started with a little =
example.
So I wrote a small C programm, printing "Hello World" (not very witty, I =
know),=20
adding "__declspec(dllexport)" before the native function.=20
I compiled the file using "gcc -c theNativeMethod.c <more compiler =
flags>"

my problem:
Then I tried (as suggested by Carl Thompson, using cygwin1.1.2) to get =
the dll:
    "gcc -Wl,--out-implib,libNative.import.a -shared -o libNative.dll =
theNativeMethod.o"

This results in the following messages:
    Creating library file: libNative.import.a        (sounds good so far =
;-)
    bfd_close: libNative.import.a Invalid operation
    collect2: ld returned 1 exit status

I am really in despair! I am quite new to all this stuff.=20
I have no real experience, neither in C++ , nor NT programming.
So any suggestions are really welcome!

Horst

Horst DOT Burmeister AT daimlerchrysler DOT com or
Horst DOT Burmeister AT berlin DOT de


------=_NextPart_000_0038_01BFEC29.E4975340--

- Raw text -


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