If program code avoid crt, it might be easy to compile it with different compilers.
I use clang-cl.exe as a reference C compiler to see more warnings, but some projects was quite easy to build with clang and with polink with Pelles C libraries.
With clang i saw many unused variables and dead code.
Hi Timo,
Pelles C can detect unused variables too. I guess you found a specific case. Could you share your code if it's possible?
I like to test codes for compability reasons.
TLPeViewUC.c had some cases, like
int i;
...
i = 0; and it wasn't used later and was a testing leftover.
char *pName = 0;
...
pName = (char*)pImportBName->Name;
EDIT 2026-10-22: A TLWHView needed a lot of changes to sources and headers for making it compilable with Clang with only using Pelles C Windows headers and libraries and msvcrt.dll
Hi Timo,
I think you can use only clang.exe to compile code without depending on the other Clang binaries :
C:\clang>clang -c -m32 -Wall Hello.c -o Hello32.o
C:\clang>set INCLUDE=D:\VCForPython27\VC\include;D:\VCForPython27\WinSDK\Include
C:\clang>clang -c -m32 -Wall Hello.c -o Hello32.o
Those headers makes things easier.
clang-cl.exe don't accept WINSDK annotations and also problems with standard headers.
VCForPython27.msi is still available too.
clang.exe hello.c -Wl,-nodefaultlib:libcmt -D_DLL -lmsvcrt -o hello_clang64.exe
I use Eclipse IDE for all projects, from windows to embedded hardware.
I use clang to compile windows apps.
Isn't perfect, but is very helpful on writing, compiling and testing.