Access violation with Tcl_EvalFIle
Posted by jane (jane), 19 April 2005Hi all,
I am not sure whether this is the right place to post this. If this post fits here, please help me. If I this is not the place, please point me to the right place.
I am very new to Tcl programming world.
I am trying to implement a TCL command in C.
Before that I wanted to try out a small experiment given in a book. But I am getting an access violation(system error) when I invoke Tcl_EvalFile. If I use Tcl_Eval with same command, then it works just fine. Somebody please hel
This is on Windows XP platform.
Thanks a lot in advance.
This is the code:
char name = "./simple.tcl";
myInterp = Tcl_CreateInterp();
retCode = Tcl_EvalFile(myInterp, name); // Access Violation
if(retCode != TCL_OK)
contents of simple.c are : puts Hello.
Posted by admin (Graham Ellis), 20 April 2005I can't spot anything straight away (but it just might be staring me in the face!). The best I can suggest is try the examples that we'ver got at http://www.wellho.net/resources/T243.html which are pretty similar; if they work, then you can play "spot the difference" and if not then I can have a further look. Also - do you have access to a "nix" operating system to test / see if your code works there. A further thought - which C compiler are you using on the Microsoft system, and were the Tcl libraries compiled under the SAME compiler? If not, that's a possible compatabilty issue.
Posted by jane (jane), 20 April 2005Thanks for the reply, Graham. I figured out what the problem was. I called Tcl_FindExecutable before calling Tcl_EvalFile and it works now. Thanks once again for your time
Other Forum Posts
Follow us on ...
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho