how to use TCC
Hello, I am a beginner of HISE.
After checking the folder "extra/demo_project/demo.zip", I tried to use "tcc Example.cpp". However, HISE fails to recognize it.
loadJITModule("Example.cpp"); (it's OK)
const var c = Example.createModule();
This does not work well. Console says "unknown function 'createModule'"...
I am using Windows 10 x64.
Christoph Hart last edited by
Wow, you're the first person ever that tries this feature
To be honest the whole JIT compilation thing is a bit abandoned - I was playing around with writing an own JIT compiler based on AsmJIT, but the problem is that you can't execute dynamically generated code on iOS (it's forbidden for "security" reasons), so having a JIT compiler on Desktop but not on iOS would destroy the portability between those two platforms.
Also getting TCC to recognise the correct standard libraries etc. is a real mess, so I'll probably just remove the example
Thanks for reply.
I am sorry. I think that JIT functionality would be more useful than iOS compatibility, though.
By the way, I tried to use the example script named "TccSimpleLP.js" with the Build version 642. However, Console says "The TCC compiler dynamic library could not be loaded." I don't know where to put libtcc_x64.dll...
Hello, I've figured out how to use the JIT example script "TccSimpleLP.js" (which exists in /HISE-1.0.0/tools/scripts ) after checking the source codes.
Download the build version 646. (windows)
Replace "TccLibrary.h" (which exists in /HISE-1.0.0/tools/tcc/windows/include) by the file "TccLibrary.h" (which exists in /HISE-1.0.0/hi_scripting/scripting/api)
Make the folder named "tcc" in C:\Users\your\AppData\Roaming\Hart Instruments & move all the contents (which exist in the source /HISE-1.0.0/tools/tcc/windows) to that folder.
That's it!! I wish this JIT functionality would be revived...
Thanks for giving HISE