Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <003301c2821c$2bb25d80$080a0a0a@mon>
From: "Alfred Lam" <alfredlam@nowmediatech.com>
To: "Harig, Mark A." <maharig@idirect.net>, <cygwin@cygwin.com>
References: <BADF3C947A1BD54FBA75C70C241B0B9E763017@ex02.idirect.net>
Subject: Re: undefined reference continues
Date: Fri, 1 Nov 2002 19:01:12 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
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@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@idirect.net>
To: Alfred Lam <alfredlam@nowmediatech.com>; <cygwin@cygwin.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/

