Dlls @n symbols in Sybase

Peter Hudson +44 1892 541 720 peter@telnet-research.co.uk
Wed Nov 24 07:25:00 GMT 1999


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



More information about the Cygwin mailing list