delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/01/06:02:28

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: <003301c2821c$2bb25d80$080a0a0a@mon>
From: "Alfred Lam" <alfredlam AT nowmediatech DOT com>
To: "Harig, Mark A." <maharig AT idirect DOT net>, <cygwin AT cygwin DOT com>
References: <BADF3C947A1BD54FBA75C70C241B0B9E763017 AT ex02 DOT idirect DOT net>
Subject: Re: undefined reference continues
Date: Fri, 1 Nov 2002 19:01:12 -0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200

Hi people,

I have been able to get .so file which I'm trying to use now in a jni link
in windows, but I'm facing some problems.
This is the situation:
I had some .cpp, .h and .lib libraries. My aim was to get a .so from these
so that it can be used in a jni link in linux, so I used cygwin. Initially,
these files were used to get a dll which talked to java programs in windows.
Now the java program is ported to linux. However even though i use the same
jvm, it cannot work since the java needs the dll. In linux the equivilent of
a dll is .so in a jni link. So, after having obtained the .so by compiling
the files in cygwin like this:
g++ *.o scdll32.lib -o scard.so, i initially got an undefined reference to
_WinMain AT 16. Having read from somewhere in the mialing list, I put an empty
main() in one of the .cpp file and the .so is produced.

Then I ported it to Linux and tried to run my java program, but then get the
following:

java.lang.unsatisfiedLinkError:/folder path/scard.so:invalied ELF header


Can anyone help me here...

Thanks,
Alfred


----- Original Message -----
From: Harig, Mark A. <maharig AT idirect DOT net>
To: Alfred Lam <alfredlam AT nowmediatech DOT com>; <cygwin AT cygwin DOT com>
Sent: Thursday, October 31, 2002 8:57 AM
Subject: RE: undefined reference continues


> For future reference, please provide this
> information as an attachment.  It makes
> the email archives more searchable because
> there will be fewer false matches.
>
> >
> > This is a more detailed info from cygwin.
> > $ cygcheck -s -v -r |more
> >
> > Cygwin Win95/NT Configuration Diagnostics
> > Current System Time: Thu Oct 31 10:23:52 2002


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