This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

undefined ELF header when porting .so file from cygwin to linux


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

Attachment: gcc.cpp
Description: Binary data

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]