Pelles C forum

Pelles C => Add-ins => Topic started by: TimoVJL on July 29, 2019, 05:25:37 PM

Title: SrcFileCC2 Add-In for v9, a second opinion
Post by: TimoVJL on July 29, 2019, 05:25:37 PM
SrcFileCC2 Add-In for v9, a second opinion insert a button to toolbar for additional compilers, to make easy way to use another C compiler to show errors and warnings.

It use SrcFileCC2x64.ini file for options.
[compiler0]
title=msvc
ccpath=cl.exe -c -wd4103 -wd4068 -Drestrict=__restrict
include=C:\code\WDDK710\include
path=C:\code\msvc2019\bin

[compiler1]
title=msvc x64
ccpath=cl.exe -c -wd4103 -wd4068 -Drestrict=__restrict
include=C:\code\WDDK710\include
path=C:\code\msvc2019\bin\x64

[options]
check_only=1


for msvc 2019 using Pelles C 9 headersccpath=cl.exe -c -wd4103 -wd4068 -Drestrict=__restrict -D__POCC__=900 -D__POCC_TARGET__=1 -D__WCHAR_TYPE__=short -D__SIZE_TYPE__=__int32 -D__midl
or for x64ccpath=cl.exe -c -wd4103 -wd4068 -Drestrict=__restrict -D__POCC__=900 -D__POCC_TARGET__=3 -D__WCHAR_TYPE__=short -D__SIZE_TYPE__=__int64 -D__midl


for clang-D__POCC__=900 -D__POCC_TARGET__=1or for x64-D__POCC__=900 -D__POCC_TARGET__=3but clang emits errors in winnt.h, so copy of modified headers are usable.
Title: Re: SrcFileCC2 Add-In for v9, a second opinion
Post by: TimoVJL on January 17, 2025, 04:26:17 AM
For using Pelles C v12 headers with Clang
Small change to winnt.h to avoid errors using #ifndef __llvm__ at line 594#ifndef __llvm__
unsigned __int32 __cdecl _rotl32(unsigned __int32, unsigned __int8);
unsigned __int64 __cdecl _rotl64(unsigned __int64, unsigned __int8);
unsigned __int32 __cdecl _rotr32(unsigned __int32, unsigned __int8);
unsigned __int64 __cdecl _rotr64(unsigned __int64, unsigned __int8);
#endif

CRT headers stdio.h and others don't work with other compilers.