Code Comments
Programming Forum and web based access to our favorite programming groups.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!
Post Follow-up to this message-----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-----
Post Follow-up to this messageThank 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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.