This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
undefined reference continues
- From: "Alfred Lam" <alfredlam at nowmediatech dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 30 Oct 2002 18:58:56 -0800
- Subject: undefined reference continues
- References: <005801c27f8a$e8d85020$080a0a0a@mon> <20021029134937.GB16855@redhat.com>
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/