-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building on Windows #4
Comments
FWIW, as an experiment I tried compiling lcc with my own compiler (Smaller C) for Widnows. After bumping up the sizes of the internal tables/arrays in Smaller C and massaging lcc's code to exclude the features currently unsupported by Smaller C, I got it to compile and seemingly work. What I did outside of Smaller C issues is roughly:
That was enough to make lcc compile tiny snippets of C code like the following into MIPS assembly:
Not terribly hard. |
The limits tests fails because the VC headers became too complex for LCC to handle. In this case, You cannot use any standard header anymore because of that, you should define standard functions and whatsover manually. Plus, for VC2015 onwards, which uses the new Universal CRT, your
Hope this helps anyone also trying to get this to build and work on Windows. |
Building lcc on Windows is basically fubar. The instruction are way outdated.
outp
incpp\cpp.c
clashes with the Windows function of the same name. Renaming it the something else makes the problem go away. (It is only used in thecpp
folder, from memory this includes :cpp.h
,cpp.c
,macro.c
,include.c
and maybe some other I forgot).libc.lib
no longer ships with Visual Studio. It should be replaced withlibcmt.lib
inetc\win32.src
, which is apparently the multi-threaded version.make ... test
) described in the installation guide fails because the filelimits.s
is generated nearly empty. The triple test (make ... triple
) hangs forever.I have not really investigated, but might it not be easier to base the Windows version on MinGW, as it is much closer to how the install works on Unix ?
Also, it would be great to offer precompiled binaries. It might at least be a temporary solution until the build system is fixed.
The text was updated successfully, but these errors were encountered: