Mail Archives: cygwin/2000/05/21/03:01:09
J D L wrote:
>
> Earnie Boyd wrote:
> >
> > --- J D L <De_Laender-De_Winter AT village DOT uunet DOT 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 AT 8
> > > _SQLAllocConnect = _SQLAllocConnect AT 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 AT 8 then linking goes OK, but
> at runtime : linked against not existing SQLAllocConnect AT 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 AT 8 (just by construct :
> function f -> _f AT stacksize)
>
> 2) The import library MUST have this function in it. So in my case
> _SQLAllocConnect AT 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
Hi,
Finally, I found the answers surfing around through FAQ's ...
(I knew ;-) )
The answer :
dlltool ... -k does the job of importing _f...@.. and exporting _f...
which is exactly what I need here.
The place to find :
mingw (FAQ) (they have their domain : www.mingw.org)
-> Story about linking with dll's that
then points further to Colin Peters pages on which the
answer is explained.
Maybe an idea to bring it a bit closer in the cygwin faq ?
(or did I just miss ?)
Best regards,
Jos
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -