delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/13/17:16:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20010413170834.02163b40@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Fri, 13 Apr 2001 17:15:21 -0400
To: lemkemch AT t-online DOT de (Michael Lemke), cygwin AT cygwin DOT com
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: Postgres 7.1RC4 ecpg can't find sqlca
In-Reply-To: <14oAi6-19LMiuC@fwd03.sul.t-online.com>
Mime-Version: 1.0

At 05:02 PM 4/13/2001, Michael Lemke wrote:
>With the latest postgres release that came lately with cygwin I made my
>very first attempt at writng an ESQL program (actually, at the moment it 
>is just something I dowloaded).  Now when I link it can't find sqlca:
>
>michael> gcc -I /usr/include/postgresql/  esql.c -lecpg -lpq
>/f/cygwin~1/tmp/ccbnOeiG.o(.text+0x203):esql.c: undefined reference to `sqlca'
>/f/cygwin~1/tmp/ccbnOeiG.o(.text+0x292):esql.c: undefined reference to `sqlca'
>collect2: ld returned 1 exit status
>
>ecpg made the declaration of sqlca 
>
>   extern struct sqlca sqlca;
>
>
>I recompiled postgres and skipped stripping of the libraries.  Then I find sqlca in
>ecpg.dll:
>
>michael> nm /usr/bin/ecpg.dll | grep sqlca
>c0586864 T _init_sqlca
>c0587000 D _sqlca
>c05870b0 d _sqlca_init
>
>but not in libecpg.a:
>
>michael> nm /usr/lib/libecpg.a | grep sqlca
>00000000 I __imp__sqlca
>00000000 I __imp__init_sqlca
>00000000 T _init_sqlca
>
>Any ideas?



Yes, you need to declare these symbols as those you want to import/export.  
Presumably, since the library does this already, you just need to find the
proper declaration of these symbols and make sure that all code that 
references them uses this.  Windows forces the notion of symbols being specified "exportable" by the use of an attribute.  You can find information about this in the email archives at least.



Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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