Is there a way to run non-Tcl commands and programs from a Tcl script.
When running non-Tcl commands from my Tcl script, I receive an 'invalid command name' message.
I encountered the following error when running a Tcl file with a compxlib command.
invalid command name "compxlib"
"compxlib -s questa -l verilog -arch all -lib all -w -dir C:\work\"
<file "test.tcl" line 1>
The 'invalid command name' message comes because the program command being executed is not a Tcl command.
Tcl scripts use "exec" to invoke other programs.
For the example above, the error will be removed by adding "exec" as below.
execcompxlib -s questa -l verilog -arch all -lib all -w -dir C:\work\
The user should ensure that the command being executed is in the system PATH or provide the complete path to the executable within the exec command.