How to use TCL Commands like Tcl_EvalFile... in C code : LUSENET : Tool Command Language (Tcl) : One Thread


I downloaded the source release for tcl8.3(unix version) and compiled it on my sun solaris server. I could install tclsh8.3 also properly. But when I wanted to write a small C program which uses tcl libraries like Tcl_EvalFile and Tcl_CreateInterp etc. to call a sample tcl program, the compiler is not recognising these commands. What option should I use while compiling the C code. My lib directory was created under /usr/soma/lib. So when I tried to give an option -l/usr/soma/lib/tcl8.3 it gave an error. Can anyone please suggest.

Thanks Soma

-- Soma Premaleela (, June 17, 2001


The way c works is like this:

cc -c -I/usr/soma/include file.c -L/usr/soma/lib -ltcl8.3 -o mycommand

The newsgroup news:comp.lang.tcl (reachable via is very useful reading for questions of this type, as is and ,

-- Larry W. Virden (, June 18, 2001.

Moderation questions? read the FAQ