Building TCC with ELF support
Page 1 of 1

Author:  scippie [ Sun May 23, 2021 9:31 am ]
Post subject:  Building TCC with ELF support

On the TCC wiki page, instructions are shown to build a TCC version that generates ELF binaries on Windows.
As after several years of Linux, I returned to Windows, I need this to continue my OS dev experiments.
But even when I stick to the tcc version mentioned on that page, it doesn't work.

First thing to fix in the batch file is .VERSION to VERSION.
But the next problem is when this is executed:
tcc-0.9.26>win32\tiny_impdef win32\libtcc.dll -o win32\libtcc\libtcc.def
tiny_impdef: could not get exported function names.

After that nothing works, tcc says it can't find '-ltcc' while libtcc.dll is there and so on...

Can this page be reviewed by someone who is more capable of fixing it than me?
Maybe even update it to the latest version of tcc?

Author:  Octocontrabass [ Sun May 23, 2021 1:01 pm ]
Post subject:  Re: Building TCC with ELF support

Have you tried WSL?

Out of curiosity, why do you need TCC specifically and not some other C compiler?

Author:  scippie [ Tue May 25, 2021 6:01 am ]
Post subject:  Re: Building TCC with ELF support

Octocontrabass wrote:
Have you tried WSL?

No I haven't and I just might :wink:
The reason is mostly because it is somewhat separated from Windows as my project files are in a Windows based directory (and I like it there because of easy editor access and things like that) while your WSL home folder is in some kind of inaccessible virtual disk. I know you can go to the Windows drive from WSL but then I have had some file security issues. I haven't investigated this enough however.

Octocontrabass wrote:
Out of curiosity, why do you need TCC specifically and not some other C compiler?

Because it's so easy to use and I like it. I want it to generate the cleanest simplest possible binaries. If it were possible for me to not use ELF, I would prefer it. But it does solve some early issues about data/code management so I embraced it.

And then, apart from these paths, my question remains a valid one, because the instructions on the wiki page don't work.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group