Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Embedding/extending with tclstubs in applications
Is the tclstub library only there for extending existing tcl
interpreters, or can it be used for embedding tcl in applications? The
main thing I'd like to do would be to use tcl stubs or anything to be
able to load the currently existing dll, because for my application I
will not know which tcl dll is in my local directory at run-time. I
also do not want to statically link with a tcl library because I want
to give the user of my application the ability to dump any tcl dll in
my application's directory and be able to work off of that version of
tcl. However, it appears that I cannot call any Tcl_ commands without
loading a dll and I would like to avoid having to explicitly name the
dll and using LoadLibrary because I don't know exactly which dll is
going to be in my local working directory. I was hoping I could
tclstubs in some way to get this working, but I cannot figure out what
exactly I can do with it. Thanks in advance for your help!


Report this thread to moderator Post Follow-up to this message
Old Post
Sam Fatoohi
04-20-05 01:58 AM


Re: Embedding/extending with tclstubs in applications
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sam Fatoohi wrote:
> Is the tclstub library only there for extending existing tcl
> interpreters, or can it be used for embedding tcl in applications?

You can use it apps, sure.

> The
> main thing I'd like to do would be to use tcl stubs or anything to be
> able to load the currently existing dll, because for my application I
> will not know which tcl dll is in my local directory at run-time.

exactly ;)

> I
> also do not want to statically link with a tcl library because I want
> to give the user of my application the ability to dump any tcl dll in
> my application's directory and be able to work off of that version of
> tcl. However, it appears that I cannot call any Tcl_ commands without
> loading a dll and I would like to avoid having to explicitly name the
> dll and using LoadLibrary because I don't know exactly which dll is
> going to be in my local working directory. I was hoping I could
> tclstubs in some way to get this working, but I cannot figure out what
> exactly I can do with it. Thanks in advance for your help!
>

First off, what O/S?  On windows you just use LoadLibrary, grab
Tcl_CreateInterp, call it, then Tcl_InitStub, Tcl_FindExecutable, then eithe
r
use or discard that interp.

- From where to LoadLibrary is a bit tricky.  ActiveTcl stores its location 
in
 HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\
ActiveTcl\* .  The old Scriptics
installers used  HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tc
l\* .  A DIY build w
ith
nmake doesn't set any regkey.  There is currently no TIP to state any cohere
nce
with this particular problem.


- --
David Gravereaux <davygrvy@pobox.com>
[species:human; planet:earth,milkyway(western spiral arm),alpha sector]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCZZjWlZadkQh/RmERAq38AKCzT5Z014LRIJXHAz0c/OiNIGIXswCgrnJk
89tlPGCcW5+gRwQQTJeXPWE=
=JYFn
-----END PGP SIGNATURE-----

Report this thread to moderator Post Follow-up to this message
Old Post
David Gravereaux
04-20-05 09:00 AM


Re: Embedding/extending with tclstubs in applications
Thank you very much for your reply David. I am using windows and
compiling with MS VC++ 6.0 (soon moving to .NET 2003). Since I don't
have the name of the tcl dll that I'm using (tcl83.dll, tcl84.dll,
etc), I'm assuming I'll have to use a function like the findTcl
function that you've used in previous posts, such as the one in which
you defined a KickStartTcl function. I'll give that a stab and
hopefully it works for me. Thanks again for your help David.


Report this thread to moderator Post Follow-up to this message
Old Post
Sam Fatoohi
04-20-05 09:00 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:19 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.