delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/23/13:37:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Subject: Re: Using Sybase DLLs from Cygwin apps
From: Michael Peppler <mpeppler AT peppler DOT org>
To: cygwin AT cygwin DOT com
In-Reply-To: <20041123172828.GB9927@trixie.casa.cgf.cx>
References: <1101230373 DOT 3390 DOT 59 DOT camel AT localhost DOT localdomain> <20041123172828 DOT GB9927 AT trixie DOT casa DOT cgf DOT cx>
Message-Id: <1101235012.3390.71.camel@localhost.localdomain>
Mime-Version: 1.0
Date: Tue, 23 Nov 2004 19:36:52 +0100
X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.5.11 (gw.peppler.org [207.234.209.79]); Tue, 23 Nov 2004 13:36:55 -0500 (EST)
X-Virus-Scanned: ClamAV 0.80/550/Mon Oct 25 11:39:01 2004 clamav-milter version 0.80j on gw.peppler.org
X-Virus-Status: Clean
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.64
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on gw.peppler.org
X-IsSubscribed: yes

On Tue, 2004-11-23 at 18:28, Christopher Faylor wrote:
> On Tue, Nov 23, 2004 at 06:19:33PM +0100, Michael Peppler wrote:
> >I'm trying to build sqsh under Cygwin and I'm running into a problem
> >with decorate vs. non-decorated library symbols.
> >
> >Is there a way to direct the linker to match up the _ct_xxx AT y symbols
> >with the corresponding _ct_xxx entries in the .a/.dll?
> >
> >Building sqsh without the __stdcall calling convention results in a
> >successful link, but the actual calls into the library fails (obviously
> >because the caller and callee don't use the same calling conventions.)
> >
> >Any ideas and suggestions would be appreciated.
> 
> Have you tried just linking directly to the DLL itself, i.e., use the DLL
> on the command line.  This should work for non-data references.

I tried it just now - same result:

gcc      cmd_alias.o ...
... sqsh_sigcld.o sqsh_stdin.o sqsh_strchr.o sqsh_tok.o sqsh_varbuf.o
sqsh_main.o -Lc:/sybase/OCS-12_5/dll -lblk -lcs -lct     -lreadline
-ltermcap  -o sqsh
cmd_bcp.o(.text+0x486): In function `cmd_bcp':
/home/Michael/sqsh-cvs/src/cmd_bcp.c:336: undefined reference to
`_ct_cmd_alloc AT 8'
...

I've been able to build this with the help of another sqsh user by
generating the .def and .a files based on an older version of the Sybase
libs - and these *have* the decorated versions of the symbols, and this
links and runs fine in my environment (i.e. with the most recent DLLs.)
I guess that as long as the calling sequences for each symbol remains
the same.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler AT peppler DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019