tcc , the Tiny C Compiler, originally by Fabrice Bellard, is a tiny but complete ISOC99 C compiler which enables you to use C as a scripting language.
from the tcc homepage:
tinycc currently supports i386, x86-64, arm, OS X, Windows, WinCE, kFreeBSD, and Hurd.
In 2004, Colin McCormack, wrote tcc tcl extension, which Eric Hassold then used as the basis odyce, without crediting Colin.
In 2007, Mark Janssen wrote tcltcc, which features VFS i/o.
Rob Landley TinyCC%|%forked tcc in 2006, and for a while most new development was happening on his fork.
In 2007, after some heckling , Landley stopped working as much on his fork, but continued making changes into 2008.
In 2012, he forked is own fork into a new project named Qcc , which hasn't produced a release and isn't currently active.
RS: Odyce (tcc wrapper in eTcl) contains a partial Critcl emulation - the difference being that no external compiler, linker etc. is needed.
[email protected] 2004-10-27:
I have a working version for windows, and have written a couple examples using Tcl C API's...Works pretty good... Still needs some work....
CMcC: Excellent. The latest version is supposed to work for windows too, the big question is: can your version create .dll files?
No, what you get is a compiled memory resident code. I use it mainly to quickly test new 'C' code segments or just needed a quick fast function call to perform something (math routine)...
I've compiled the tcc into a DLL and load it into tcl, then load/unload my 'C' scripts...I have put in hooks to call the tcl API so I can create new commands...The main difference is that you use the "main" function the same as the "init" call to initialize the code...
example 'C' script:
AMG 2005-12-08, updated 2014-06-23: I removed the example script because it's horribly corrupted. Look in the revision history [L2 ] if you want to try and salvage it. And remember, when pasting blocks of code in the Tcl wiki, prefix each line with a space character, or use ====== notation. Also proofread the result of your edit to see that it looks the way you intend.
PWQ 2005-01-06: I have used tcc 0.9.22 and I have found there are some differences in execution between compiling with gcc and tcc.
One opengl program does not display any opengl renderings even though the glut menu displays.
I think tcc has some way to go before becoming a contender for a JIT type of extension to TCL.