Re: Tcl extensions built with lcc-win32



Olaf Dietrich schrieb:

I could build and load my extension, but only when linking with the
non-stubs libraries (tcl85.[lib|dll], tk85.[lib|dll]). However, I was not
able to build a version of the extension using the Tcl stubs mechanism,
i.e. linking with the tclstub85.lib library (which I also transformed
to the lcc format). The dll of my extension is built without any
errors or warnings, but when I attempt to load the extension, Tcl
complains:

Tclstubs is a mechanism to load extensions without the OS library loader, or at least with much less interaction. The "tclStubsPtr" that you see in your dumpbin output contains addresses of functions in tcl.dll (I believe) which are resolved by the stubs mechanism at runtime.
Lcc seems to produces binaries that can not track down these function pointers. I suggest you the following:

a) compile Tcl and Tk with LCC and try these binaries for compiling your extension
b) just use MSVC. It also works with msys/gcc.


--
Eckhard
.



Relevant Pages

  • Re: Goodbye TCL
    ... anyone that likes TCL and TK and wants to see ... support for the language increase rather then decrease and usage increase ... Unfortunately it is not the TCL core, it comes with restrictions, anf it ... "distribution of record" for what clearly many users want - an extension ...
    (comp.lang.tcl)
  • Re: Porting *nix binary extensions to Win32
    ... >example extension I just wrote under OS X and compile it on Windows. ... Tcl extensions on Windows, circa 2006, as I understand them: ... Note that even if you're using MSVC6, you still need MinGW ... > Also, the comment "If you use Borland, ...
    (comp.lang.tcl)
  • Re: Distribution mechanisms
    ... Let's start by defining what you mean by "distribution mechanism". ... For tcl, this has been a long term complaint. ... Mr. Nash as "file format and the Tcl commands used to load a new ... extension directory layouts, but required one to use a special starkit ...
    (comp.lang.tcl)
  • Re: Tk_Window and TkWindow
    ... of the Tk public interface? ... So, if I implement the workaround now, I don't care if it is going to be fixed in the next stable tcl version. ... Let alone the fact that I was developing it in March 2006 - perhaps I am not in the mood to make changes two and three years after the period I had time to spend on an extension. ...
    (comp.lang.tcl)
  • Re: Understanding STUBS
    ... e> You develop with MFC on windows, using their Visual Studio - and don't ... e> Dynamic libraries behave somewhat like executables ... e> programs that have built-in Tcl. ... An *extension* linked against tcl$stub.lib ...
    (comp.lang.tcl)