Re: creating stand-alone extended tclsh
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Sun, 29 Apr 2007 03:06:45 -0700
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
- Follow-Ups:
- Re: creating stand-alone extended tclsh
- From: Alexandre Ferrieux
- Re: creating stand-alone extended tclsh
- References:
- creating stand-alone extended tclsh
- From: Will Parsons
- creating stand-alone extended tclsh
- Prev by Date: Re: creating stand-alone extended tclsh
- Next by Date: n00b saying "hi"
- Previous by thread: Re: creating stand-alone extended tclsh
- Next by thread: Re: creating stand-alone extended tclsh
- Index(es):
Relevant Pages
|