I guess I misunderstood, I thought that your file was all of the header files and the runtime placed into one source file so that you could have tcc or libtcc be part of a project and make the product/or tcc be a single executable that doesn't need directories.
ie. without needing link files for the run time and without needing a directory tree of include files, (or the same for a program using libtcc internally).
But this is just another way of BUILDING tcc.
I wanted a project that USES libtcc without needing a directory of standard includes and without needing lib files - ie a single file product. I wanted to USE libtcc, I didn't want a project that that BUILDS tcc.
And since your file starts with a number of standard includes, your file doesn't even stop people from needing all of directories of includes, it just saves them from needing make? Or this is so that people can use the equivalent of libtcc without knowing how to link a library into their own program?
So this isn't for making products that use lib tcc, it's for developers who hate make and for some strange reason don't want to link?
I don't get it, what sort of meta-product needs to compile tcc over and over?
Is this just to save time on running make on your personal project that changes tcc? And the cost of that is that tcc is one huge file? That still doesn't tell me why you smashed tcc's headers into it since you need to include tcc compatible versions of the header files anyway. You don't want people to need make, but they'll still need gnu C for the headers?
Anyway I GOT MY ADDON WORKING, there were just a bunch of typos.
But I'm gonna rewrite it. Instead of making the embedded directory a zip file and adding a bunch of libraries to handle zip files, I'm gonna make it a tar file (uncompressed), write a program that converts a tar file into a .c file (so my program won't need an external tar file) and just write c code that can make an index into a tar file in memory.
And I'll keep my change to libtcc so that it searches my virtual file first.
That will mean that the feature needs minimal changes to the project and it will make a compiler that's much faster than a version that reads from a compressed archive.
Just add a flag to the make (I have it as -s on the windows bat file make) and it will build versions of tcc and libtcc that don't need directories of include and libraries.
There are some things that won't work. You can't load a dynamic link library out of an archive.
But my idea of using libtcc as a jit needs work on exporting the run time, I think. Though I noticed libtcc reading a file called "msvcrt.def", so maybe it's doing something clever and reusing the runtime library of embedded program?