HISE Logo Forum
    • Categories
    • Register
    • Login

    how to use TCC

    Scheduled Pinned Locked Moved C++ Development
    4 Posts 2 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      signe
      last edited by

      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.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        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 :)

        1 Reply Last reply Reply Quote 0
        • S
          signe
          last edited by

          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...

          1 Reply Last reply Reply Quote 0
          • S
            signe
            last edited by

            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.

            1. Download the build version 646. (windows)

            2. 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)

            3. 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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            28

            Online

            1.8k

            Users

            12.1k

            Topics

            105.2k

            Posts