From: Pascal Obry on
petter_fryklund(a)hotmail.com a �crit :
> Is there anyway to obtain a listing of the contents of a .lib file? I

Microsoft dumpbin tool. For import libraries you can try GNU/nm.

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
From: petter_fryklund on
I tried the nm tool. I had not noticed carefully enought, but was only
missing a few routines: Tcl_GetRefCount, Tcl_CallDecrRefCount,
Tcl_CallIncrRefCount, Tcl_GetObjTypeName and Tcl_PrintObj, neither of
which are present in tcl84.lib so it seems like TASH needs another
Tcl?
From: sjw on
On Jan 22, 7:08 am, Pascal Obry <pas...(a)obry.net> wrote:
> sjw a écrit :
>
> > The GNAT documentation that came with GPL-2007 (Windows) was where I
> > got this from, there wasn't any limitation mentioned there. Anyway,
> > it seems we can get away with it with Tcl.
>
> Well I wrote a good part of the Windows sections. So I know what I'm
> talking about :) Are you saying then that the .lib is an import library
> (as opposed to plain static library)? In that case yes it should work.

This is in F.7 .. I think it has to be an import library, full of
symbols like
00000000 T _TclpThreadExit
00000000 I __imp__TclpThreadExit

> Note also that we recent GNAT versions you can even link directly
> against a shared library (.dll) built with the GNU toolset.

I can say -LC:/Tcl/lib (in which case I guess it sees tcl84.lib) or -
LC:/Tcl/bin (in which case it has to be seeing tcl84.dll).
From: sjw on
On Jan 22, 7:20 pm, petter_frykl...(a)hotmail.com wrote:
> I tried the nm tool. I had not noticed carefully enought, but was only
> missing a few routines: Tcl_GetRefCount, Tcl_CallDecrRefCount,
> Tcl_CallIncrRefCount, Tcl_GetObjTypeName and Tcl_PrintObj, neither of
> which are present in tcl84.lib so it seems like TASH needs another
> Tcl?

Light has dawned.

If you look in src/ of the tcladashell code you'll find two C files,
tclmacro.c and tkmacro.c. Compile these with gcc (the one build in to
GNAT would be best),
gcc -c -g -O2 -IC:/Tcl/include tclmacro.c
gcc -c -g -O2 -IC:/Tcl/include tkmacro.c
and include the resulting objects in your link.

The top of tclmacro.c says
/*
* tclmacro.c --
*
* This file encapsulates calls to all tcl.h macro functions into C
* function calls. These can then be called from Ada. This avoids
* having to translate the macro.

--S

(by the way, ActiveState only seem to have the threaded version: the
one I have is ActiveTcl8.4.17.0.283511-win32-ix86-threaded.exe)
From: Pascal Obry on
sjw a �crit :
> This is in F.7 .. I think it has to be an import library, full of
> symbols like
> 00000000 T _TclpThreadExit
> 00000000 I __imp__TclpThreadExit

Yes this is an import library.

> I can say -LC:/Tcl/lib (in which case I guess it sees tcl84.lib) or -
> LC:/Tcl/bin (in which case it has to be seeing tcl84.dll).

The later. But tcl84.dll must be built with the binutils tools or at
least if built with Microsoft toolset one should not have played with
removing the @nn suffix for example as this would break the exported
symbol names.

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595