This is the mail archive of the cygwin 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]

Re: Using Sybase DLLs from Cygwin apps


On Fri, 2004-11-26 at 11:18, Gerrit P. Haase wrote:
> Michael Peppler wrote:
> 
> > [ Note - I'm a Unix/linux person and know very little about Windows ]
> > 
> > I'm trying to build sqsh under Cygwin and I'm running into a problem
> > with decorate vs. non-decorated library symbols.
> > 
> > Sybase uses the __stdcall calling convention for its libraries under
> > Windows, so gcc generates symbols like _ct_results@8.
> > 
> > I've gone through the Cygwin docs on linking with Windows DLLs, and I've
> > generated three .def files and .a files using the following:
> > 
> > cd $SYBASE/OCS-12_5/lib
> > for i in libblk libcs libct; do
> >     echo "EXPORTS" >${i}.def
> >     nm ${i}.lib | grep 'T _' | sed 's/.* T _//' >>${i}.def
> >     dlltool --dllname ${i}.dll --def ${i}.def --output-lib ${i}.a
> > done
> > 
> > This generates what looks like valid .a files, *but* they are all with
> > non-decorated symbols, and of course the link phase fails.
> > 
> > Is there a way to direct the linker to match up the _ct_xxx@y symbols
> > with the corresponding _ct_xxx entries in the .a/.dll?
> 
> Have you tried the ld flag '--enable-stdcall-fixup'?

Thanks, but a quick test doesn't appear to show any improvements. I'll
try some more permutations when I have more time.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]