dlltool errors

2002-11-11 Thread Alfred Lam
Hi,

I'm trying to build a library from a dll and did the steps below:

$ ../croxx/pexports-0.42h/bin/pexports.exe scdll32.dll | sed 's/^_//' 
scdll32.def

$ dlltool --input-def scdll32.def --dllname scdll32.dll --output-lib
libscdll32.a

and obtained the following errors:

dh.s: Assembler messages:
dh.s:5: Error: Cannot represent relocation type BFD_RELOC_RVA
dh.s:10: Error: Cannot represent relocation type BFD_RELOC_RVA
dh.s:11: Error: Cannot represent relocation type BFD_RELOC_RVA
dlltool: as exited with status 1

 Can anyone tell me what is the error here and how to solve it..
Attached is dh.s and scdll32.def

Thanks,
Alfred



dh.s
Description: Binary data


scdll32.def
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/


dlltool more error messages

2002-11-11 Thread Alfred Lam
Hello,

here are some more debug code from dlltool error message after doing :

$ ../croxx/pexports-0.42h/bin/pexports.exe scdll32.dll | sed 's/^_//' 
scdll32.def

$ dlltool  -D scdll32.dll -d scdll32.def -v -l libscdll32.a
dlltool: Processing def file: scdll32.def
dlltool: LIBRARY: NETSAPI.dll base: 
dlltool: Processed def file
dlltool: Processing definitions
dlltool: Processed definitions
dlltool: Creating library file: libscdll32.a
dlltool: run: as   -o dh.o dh.s
dh.s: Assembler messages:
dh.s:5: Error: Cannot represent relocation type BFD_RELOC_RVA
dh.s:10: Error: Cannot represent relocation type BFD_RELOC_RVA
dh.s:11: Error: Cannot represent relocation type BFD_RELOC_RVA
dlltool: as exited with status 1
dlltool: run: as   -o dt.o dt.


$ dlltool -V
GNU dlltool 2.13.90 20021108
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.



Can anyone  help me on this...

Thanks,
Alfred



dh.s
Description: Binary data


dt.s
Description: Binary data


scdll32.def
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/


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

2002-11-05 Thread Alfred Lam
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



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/


Re: undefined reference continues

2002-11-01 Thread Alfred Lam
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. [EMAIL PROTECTED]
To: Alfred Lam [EMAIL PROTECTED]; [EMAIL PROTECTED]
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/




undefined reference continues

2002-10-30 Thread Alfred Lam
Hi all,

I have been trying for 4 days already and I'm getting the same undefined
reference to 

I have tried the same command with the same program on Linux and it is
working, but on cygwin, it's not.. Can anyone help me.. This is what I did :

My windows pc is win98. The program is that of smart card where I use ctapi
library. I'm trying to produce a .so file so that it can be used in a jni
link which will be used in a java program. I have tried this on my linux
machine. I have also tried libtool but to no end

gcc main.o -L. -lctapi -o main.so where ctapi is libctapi.a and I tried the
same in cygwin, but I always get undefined reference e.g
$ gcc main.o -L. -lctapi -o main.so
main.o(.text+0x4b):main.c: undefined reference to `CT_init'
main.o(.text+0x8d):main.c: undefined reference to `CT_close'
main.o(.text+0x127):main.c: undefined reference to `CT_data'
main.o(.text+0x1eb):main.c: undefined reference to `CT_data'
main.o(.text+0x34d):main.c: undefined reference to `CT_data'
collect2: ld returned 1 exit status

I have also tried using ctapi.lib instead of libctapi.a, used main.c
instead of main.o, put the library first, try to create main.exe instead of
main.so , but to no avail. Did I go wrong somewhere?
Can someone help me please...

Thanks,
Alfred



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




Re: undefined reference continues

2002-10-30 Thread Alfred Lam
/lib   system  binmode
.  /cygdrive  userbinmode,cygdrive

Found: D:\cygwin\bin\bash.exe
Found: D:\cygwin\bin\cat.exe
Found: D:\cygwin\bin\cpp.exe
Found: D:\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Warning: D:\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
Found: D:\cygwin\bin\gcc.exe
Found: D:\cygwin\bin\gdb.exe
Found: D:\cygwin\bin\ld.exe
Found: D:\cygwin\bin\ls.exe
Found: D:\cygwin\bin\make.exe
Found: D:\cygwin\bin\sh.exe

   19k 2002/02/20 D:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
  cyggdbm.dll v0.0 ts=2002/2/19 19:05
   22k 2001/12/13 D:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
  cygintl-1.dll v0.0 ts=2001/12/13 1:28
  cygintl-1.dll v0.0 ts=2001/12/13 1:28
   45k 2001/04/25 D:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
  cygform5.dll v0.0 ts=2001/4/24 22:28
   26k 2001/04/25 D:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
  cygmenu5.dll v0.0 ts=2001/4/24 22:27
  156k 2001/04/25 D:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
  cygncurses++5.dll v0.0 ts=2001/4/24 22:29
  226k 2001/04/25 D:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
  cygncurses5.dll v0.0 ts=2001/4/24 22:17
   15k 2001/04/25 D:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
  cygpanel5.dll v0.0 ts=2001/4/24 22:27
   35k 2002/01/09 D:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
  cygform6.dll v0.0 ts=2002/1/8 22:03
   20k 2002/01/09 D:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
  cygmenu6.dll v0.0 ts=2002/1/8 22:03
  175k 2002/01/09 D:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
  cygncurses++6.dll v0.0 ts=2002/1/8 22:03
  202k 2002/01/09 D:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
  cygncurses6.dll v0.0 ts=2002/1/8 22:03
   12k 2002/01/09 D:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
  cygpanel6.dll v0.0 ts=2002/1/8 22:03
   17k 2001/06/28 D:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
  cyghistory4.dll v0.0 ts=2001/1/6 20:34
  108k 2001/06/28 D:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
Cygwin Package Information
Last downloaded files to: C:\WINDOWS\Desktop\download\softwares
Last downloaded files from:
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.
redhat.com/cygwin

Package Version
_update-info-dir00077-1
ash 20020731-1
autoconf2.53b-1
autoconf-devel  2.53a-1
autoconf-stable 2.13-4
automake1.6.2-1
automake-devel  1.6.2-1
automake-stable 1.4p5-5
base-files  1.0-1
base-passwd 1.0-1
bash2.05b-5
binutils20020706-2
cygwin  1.3.14-1
diff1.0-1
diff1.0-1
diffutils   2.8.1-1
fileutils   4.1-1
findutils   4.1.7-4
gawk3.1.1-5
gcc 3.2-1
gcc-mingw   3.2-20020817-1
gcc22.95.3-10
gdb 20010428-3
gdbm1.8.0-4
grep2.5-1
groff   1.17.2-1
gzip1.3.3-4
less374-1
libiconv2   1.8-2
libintl10.10.40-1
libintl20.11.5-1
libltdl320020705-2
libncurses5 5.2-1
libncurses6 5.2-8
libreadline44.1-2
libreadline54.3-2
libtool 20020705-1
libtool-devel   20020705-2
libtool-stable  1.4.2-2
login   1.4-4
m4  0.0
make3.79.1-7
man 1.5g-2
mingw-runtime   2.2-1
mktemp  1.4-1
more2.11o-1
ncurses 5.2-8
opengl  1.1.0-6
pcre3.7-1
perl5.6.1-2
readline4.3-2
sed 3.02-1
sh-utils2.0-2
tar 1.13.25-1
termcap 20020930-1
terminfo5.2-3
texinfo 4.2-4
textutils   2.0.21-1
w32api  2.0-1
which   1.5-1
zlib1.1.4-1

Anyone can tell me how I can fix these errors..

Thanks,
Alfred

- Original Message -
From: Harig, Mark A. [EMAIL PROTECTED]
To: Alfred Lam [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 8:33 AM
Subject: RE: undefined reference continues



 As requested at http://cygwin.com/bugs.html,
 please include the output of 'cygcheck -s -v -r'
 (as an attachment).  This will provide anyone
 looking at your question with information
 such as which version of Cygwin you are
 running and which version of gcc you
 have installed.

  -Original Message-
  From: Alfred Lam [mailto:alfredlam;nowmediatech.com]
  Sent: Wednesday, October 30, 2002 9:59 PM
  To: [EMAIL PROTECTED]
  Subject: undefined reference continues
 
 
  Hi all,
 
  I have been trying for 4 days already and I'm getting the
  same

smarc card undefined reference

2002-10-29 Thread Alfred Lam
Hi all,

I have been trying for 3 days already and I'm getting the same frustrating
undefined reference to 

I have tried the same command with the same program on Linux and it is
working, but on cygwin, it's not.. Can anyone help me.. This is what I did :

My windows pc is win98. The program is that of smart card where I use ctapi
library. I'm trying to produce a .so file so that it can be used in a jni
link which will be used in a java program. I have tried this on my linux
machine

gcc main.o -L. -lctapi -o main.so where ctapi is libctapi.a and I tried the
same in cygwin, but I always get undefined reference e.g
$ gcc main.o -L. -lctapi -o main.so
main.o(.text+0x4b):main.c: undefined reference to `CT_init'
main.o(.text+0x8d):main.c: undefined reference to `CT_close'
main.o(.text+0x127):main.c: undefined reference to `CT_data'
main.o(.text+0x1eb):main.c: undefined reference to `CT_data'
main.o(.text+0x34d):main.c: undefined reference to `CT_data'
collect2: ld returned 1 exit status

I have also tried using ctapi.lib instead of libctapi.a, used main.c
instead of main.o, put the library first, try to create main.exe instead of
main.so , but to no avail. Did I go wrong somewhere?
Can someone help me please...

Thanks,
Alfred
- Original Message -
From: Christopher Faylor [EMAIL PROTECTED]
To: Alfred Lam [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 29, 2002 5:49 AM
Subject: Re: cygwin gcc:undefined reference



 Please check out the project web page for links to available information
 and ports:  http://cygwin.com/ .  In particular, check out
 http://cygwin.com/lists.html and http://cygwin.com/bugs.html .

 If you don't see what you need there, then the cygwin mailing list is
 the best place to make observations or get questions answered.
 Information on the mailing list is available at the project web page.

 For your convenience, I've reset the Reply-To: address to point to the
 cygwin mailing list.  I've also Cc'ed this reply there.


 On Tue, Oct 29, 2002 at 12:36:20PM -0800, Alfred Lam wrote:
 Hi Chris
 
 I've tried your suggestion on the cygwin gcc user library question =
 response from the mailing list of 28 aril 2000, however it's not =
 working.
 
 My windows pc is win98. The program is that of smart card where I use =
 ctapi library. I'm trying to produce a .so file so that it can be used =
 in a jni link which will be used in a java program. I have tried this on
=
 my linux machine=20
 
 gcc main.o -L./ -lctapi -o main.so where ctapi is libctapi.a and I tried
=
 the same in cygwin, but I always get undefined reference e.g
 $ g++ --shared main.o -L./ -lctapi -o main.so
 main.o(.text+0x4b):main.c: undefined reference to `CT_init'
 main.o(.text+0x8d):main.c: undefined reference to `CT_close'
 main.o(.text+0x127):main.c: undefined reference to `CT_data'
 main.o(.text+0x1eb):main.c: undefined reference to `CT_data'
 main.o(.text+0x34d):main.c: undefined reference to `CT_data'
 collect2: ld returned 1 exit status
 
 I have also tried using ctapi.lib instead of libctapi.a, but to no =
 avail. Did I go wrong somewhere?
 
 Rgds,
 Alfred
 
 


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