Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-ID: <392777C0.1FDD804F@village.uunet.be>
Date: Sun, 21 May 2000 07:44:32 +0200
From: J D L <De_Laender-De_Winter@village.uunet.be>
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: "cygwin@sourceware.cygnus.com" <cygwin@sourceware.cygnus.com>
CC: earnie_boyd@yahoo.com
Subject: Re: DLL's ; Import libs ; def files etc ..
References: <20000520202210.10082.qmail@web125.yahoomail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



Earnie Boyd wrote:
> 
> --- J D L <De_Laender-De_Winter@village.uunet.be> wrote:
> -8<-
> > I have a database program, distributed as an DLL.
> > The distribution contains also import libraries for
> > the Borland compiler and the Microsoft compiler.
> > On top of that it even contains a .DEF file, however with
> > following constructs in it :
> >
> > EXPORTS
> >     _SQLAllocConnect@8
> >     _SQLAllocConnect = _SQLAllocConnect@8
> >
> > I created a 'cygnus' def file with the usual manipulations out of
> > the FAQ.
> >
> -8<-
> 
> Why didn't you use the supplied .def file to create the import library???  By
> creating your own you missed the aliases that were in the supplied .DEF file
> that caused your problems.
> 

I hoped it was that simple ...

Apart from stopping on some syntax errors before the 'EXPORTS' section
(that I corrected by removing most lines before EXPORTS) :

1) If I keep only the SQLAllocConnect@8 then linking goes OK, but
at runtime : linked against not existing SQLAllocConnect@8
2) If I keep only SQLAllocConnect, then linking fails ...
3) If I keep the whole stuff, then the same as 1.

My (restricted knowledge) is : 

1) the object code calls _SQLAllocConnect@8 (just by construct :
function f -> _f@stacksize)

2) The import library MUST have this function in it. So in my case
_SQLAllocConnect@8 must be in the import

3) The DLL expects _SQLAllocConnect as function call, which
is proven by my manipulation via assembly. Changing the _f@ by _f
does really the job !

4) Somewhere the equivalence between both should be declared
but how and where in cygnus' environment ???? The .DEF file ???

Thanks for all explanation/help !

Jos

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

