Could I get a step by step on how to compile my file.c using Tiny C Compiler and Windows prompt?
Some questions I already have:
- Where do I stick all TCC files from the download?
- Do I have to compile stdio.h to use the printf function? (I'd like to do a 'Hello World').
This is what my file.c looks like:
// #include <stdio.h> // for printf
int main(void){
printf("Hello Eric. You've compiled and run the program! \n");
}
Thanks,
EDIT 1
So far I'm running it and getting the error: include file 'stdio.h' not found.
you put the files wherever you like.
no, you do not need to compile
stdio.h
in order to use theprintf()
function.the tcc-distribution (tcc-0.9.25-win32-bin\tcc) consists of this:
if you do not tear that order apart,
tcc
should work out of the box (i compiled a hello.c seconds ago). if you separated the files or something else does not work:by looking at the source code of
tcc
i found this:so, per default it assumes the libs and the headers to be in the place right next to the
tcc.exe
.