Re: creating stand-alone extended tclsh



Will Parsons wrote:
I would like to create a tclsh with application-specific extensions. The
information on creating Tcl extensions that I have been able to obtain by
googling seems to be oriented toward creating loadable libraries, which is
not what I want - I need to create a stand-alone tclsh that incorporates
an interface to a static C application library. Any advice on how to go
about this starting from just the Tcl source distribution? (I've looked
at the sampleextension, but it only seems to create an extension library,
not an independent shell.)

It's not hard at all to do.

1) build all your custom extensions (including tcl itself) as static libraries.
2) Modify Tcl_Init() in AppInit.c to call each XXX_Init() functions in those
extensions. More directions are found in the comments of Tcl_Init().
3) link it all together as one big tclsh
4) relish your in your large executable, though I prefer those grilled red onions
and mustard to top my dogs.

--
"It's great to have a friend who appreciates an earnest discussion of
ideas." -Calvin

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: Managing reusable code for multiple Tcl applications
    ... it is very similar to various issues we overcame with Tcl Dev Kit or related apps. ... We have some mid-size applications (couple of thousand ... up auto_path appropriately to locate the reusable libraries. ... This all works wonderfully until distribution time, ...
    (comp.lang.tcl)
  • Re: Porting from other UNIX platforms to Linux (64bit)
    ... > Does your application currently work in 64 bit environments? ... no - our application started originally with tcl 7.0 and the GUI ... external tcl extending libraries like togl. ... For builds on Linux, we are due to the missing company wide build ...
    (comp.lang.tcl)
  • Re: Managing reusable code for multiple Tcl applications
    ... I have introduced Tcl to my company and we now use it quite ... We have some mid-size applications (couple of thousand ... up auto_path appropriately to locate the reusable libraries. ... This all works wonderfully until distribution time, ...
    (comp.lang.tcl)
  • Managing reusable code for multiple Tcl applications
    ... I have introduced Tcl to my company and we now use it quite ... We have some mid-size applications (couple of thousand ... up auto_path appropriately to locate the reusable libraries. ... This all works wonderfully until distribution time, ...
    (comp.lang.tcl)
  • Re: apache rivet: configure.tcl and make.tcl missing from distribution
    ... # -D flags for use with the C compiler. ... # If TCL was built with debugging symbols, ... # this string at the end of the library name. ... # Flag to indicate whether shared libraries need export files. ...
    (comp.lang.tcl)