Mail Archives: cygwin/2002/11/01/06:02:28
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 -