Livespi -
A while ago I started work on a Perl wrapper for libtcc so that Perl can have just-in-time compilation of C code that compiles faster than Inline::C. Your question caused me to dust off the work, which was in something of a limbo state, and finish the mechanism for exposing C functions to Perl. I also updated the documentation while I was working on it. Active work is under
one of my github repositories. As of this morning, you can now compile C functions in Perl at runtime, and invoke them from Perl! As of this afternoon, the documentation will actually tell you something useful. :-)
I realize that this doesn't address your exact problem, loading dlls. But if you are trying to dynamically load tcc-compiled dlls because you're building C code at runtime, this will give you a TCC-powered alternative. To get an idea for how it works, see
the main module's documentation, as well as
the documentation for TCC::Callable. This is actually in a good enough state that I should be able to upload it to CPAN, and I will do that once I've got it working for Windows. If could also get it working for Mac, that'd be awesome. :-)
Although I have developed this on Linux, it should be able to detect tcc and work on Windows. I'd be interested to hear feedback and to update the module with more features that you might find useful. I'd be happy to work on this to get it working for Windows if it doesn't work.