public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Dlls @n symbols in Sybase
@ 1999-11-24  7:25 Peter Hudson +44 1892 541 720
  1999-11-30 23:39 ` Peter Hudson +44 1892 541 720
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Hudson +44 1892 541 720 @ 1999-11-24  7:25 UTC (permalink / raw)
  To: cygwin

I am trying to write a Cygwin application that uses a Sybase Open
Client DLL (libsybdb.dll). Just about all of its symbols in the
.lib file end with @<n>

I have created a .a following the standard Cygwin documentation, with the
addition of --add-stdcall-alias .

However, if I then do an 'nm' on the resulting .a , the aliases without @<n>
aren't there, so my link fails with undefined symbols. My exact commands
are:

echo EXPORTS > LIBSYBDB.def
nm LIBSYBDB.lib | grep ' T _' | sed -e 's/.* T _//' >> LIBSYBDB.def
dlltool -v --add-stdcall-alias --def LIBSYBDB.def --dllname LIBSYBDB.dll \
  --output-lib LIBSYBDB.a

I have also experimented with --kill-at , but this makes no difference.

I have also manually edited the .def file, following a suggestion in the
mail archive, by adding this sort of aliasing:

 LIBRARY sample
 EXPORTS
 Bar@0
 Bar=Bar@0
 Foo@24
 Foo=Foo@24

This overcomes the undefined symbols at link time. But at runtime, the
stack gets corrupted ('where' in gdb becomes corrupt).

My main issue here is that --add-stdcall-alias does not seem to
have any effect. Why might that be?

Thanks for any suggestions.

Peter Hudson
Telnet Research Ltd

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Dlls @n symbols in Sybase
  1999-11-24  7:25 Dlls @n symbols in Sybase Peter Hudson +44 1892 541 720
@ 1999-11-30 23:39 ` Peter Hudson +44 1892 541 720
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Hudson +44 1892 541 720 @ 1999-11-30 23:39 UTC (permalink / raw)
  To: cygwin

I am trying to write a Cygwin application that uses a Sybase Open
Client DLL (libsybdb.dll). Just about all of its symbols in the
.lib file end with @<n>

I have created a .a following the standard Cygwin documentation, with the
addition of --add-stdcall-alias .

However, if I then do an 'nm' on the resulting .a , the aliases without @<n>
aren't there, so my link fails with undefined symbols. My exact commands
are:

echo EXPORTS > LIBSYBDB.def
nm LIBSYBDB.lib | grep ' T _' | sed -e 's/.* T _//' >> LIBSYBDB.def
dlltool -v --add-stdcall-alias --def LIBSYBDB.def --dllname LIBSYBDB.dll \
  --output-lib LIBSYBDB.a

I have also experimented with --kill-at , but this makes no difference.

I have also manually edited the .def file, following a suggestion in the
mail archive, by adding this sort of aliasing:

 LIBRARY sample
 EXPORTS
 Bar@0
 Bar=Bar@0
 Foo@24
 Foo=Foo@24

This overcomes the undefined symbols at link time. But at runtime, the
stack gets corrupted ('where' in gdb becomes corrupt).

My main issue here is that --add-stdcall-alias does not seem to
have any effect. Why might that be?

Thanks for any suggestions.

Peter Hudson
Telnet Research Ltd

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-30 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-24  7:25 Dlls @n symbols in Sybase Peter Hudson +44 1892 541 720
1999-11-30 23:39 ` Peter Hudson +44 1892 541 720

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).