delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/05/03:48:34

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: <001201c2852e$29487740$080a0a0a@mon>
From: "Alfred Lam" <alfredlam AT nowmediatech DOT com>
To: <cygwin AT cygwin DOT com>
References: <BADF3C947A1BD54FBA75C70C241B0B9E763017 AT ex02 DOT idirect DOT net>
Subject: undefined ELF header when porting .so file from cygwin to linux
Date: Tue, 5 Nov 2002 16:47:32 -0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200

------=_NextPart_000_000F_01C284EB.091BE800
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi all,

I'm facing a problem for which there were not much help. I have created a
.so file in cygwin since the programs used windows.h and a .lib file. After
having created this .so file, I used it in a jni link. Previously, a .dll
was created which was used in a jni link, but now I need the equivalent .so
for linux, which I have obtained in cygwin with:
g++ *.o scard.lib -o libscard.so. Now I'm trying to use it in Red Hat Linux,
but get this error:

Exception in thread "main" java.lang.unsatisfiedLinkError:/pathname of
LD_LIBRARY_PATH to .so/ invalid ELF header.

The command send was a simple java main from which call the .so file.

Can someone help me in removing this ELF error message.
 I have tried to do everything in Linux. I have been able to obtain the .o
files after including the windows header files, but then to create the .so
which needed scard.lib, it gave me error messages. I believe that i cannot
use the .lib file properly in linux, but in cygwin, there is no complaint.
So I have to get this .so in cygwin and java should not complain in linux
when I use this .so

Thanks,
Alfred

------=_NextPart_000_000F_01C284EB.091BE800
Content-Type: application/octet-stream;
	name="gcc.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="gcc.cpp"

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-1/configure =
--enable-languages=3Dc,c++,f77,ja
va --enable-libgcj --enable-threads=3Dposix --with-system-zlib =
--enable-nls --with
out-included-gettext --enable-interpreter --disable-sjlj-exceptions =
--disable-ve
rsion-specific-runtime-libs --enable-shared --build=3Di686-pc-linux =
--host=3Di686-pc
-cygwin --target=3Di686-pc-cygwin --enable-haifa --prefix=3D/usr =
--exec-prefix=3D/usr
--sysconfdir=3D/etc --libdir=3D/usr/lib =
--includedir=3D/nonexistent/include --libexecd
ir=3D/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)


------=_NextPart_000_000F_01C284EB.091BE800
Content-Type: text/plain; charset=us-ascii

--
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/
------=_NextPart_000_000F_01C284EB.091BE800--

- Raw text -


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