"cc /E prog.c" works fine with version 10.00. But with version 11.00 I get an error:
"Unable to find or execute POCC.EXE"
prog.c:
#include <stdio.h>
int main ( void )
{
puts("Hello");
return 0;
}
I've never used cc.exe so I'm not an expert on its use. That said, /E is a valid option
for pocc.exe but /E does not appear on the list of options for cc.exe ( see below ).
That cc /E partially works may simply be a fluke.
Pelles Compiler Driver, Version 11.00.0
Copyright (c) Pelle Orinius 2002-2021
Syntax:
CC [options]
[@commandfile]
{ [compiler options] filename1.c [filename2.c ...] |
[assembler options] filename1.asm [filename2.asm ...] }
[filename1.rc [filename2.rc ...]]
[linker options]
[options]
Options:
/a Send assembly files to the C compiler (compatibility)
/c Compile only, no link
/o<file> Name the output file; either /Fe or /Fo
/Fe<execfile> Name the executable file
/Fo<outfile> Name the output file
/x Don't set environment from the Registry
Compiler options: see POCC
Assembler options: see POASM
Linker options: see POLINK
In my test
@C:\code\PellesC11\bin\cc.exe /E hello.c
switch /E works once, but after thatextern __declspec(nodiscard) FILE * __cdecl _popen(const char *, const char *);
fatal error: Internal error: 'Access violation' at 0x00000000771fa1ff.
SET PATH=C:\code\PellesC11\bin
cc.exe /E prog.c
pocc.exe crash while prosessing file in Windows 7
...
extern __declspec(nodiscard) FILE * __cdecl _popen(const char *, const char *);
fatal error: Internal error: 'Access violation' at 0x00000000771fa1ff.
orextern __declspec(nodiscard) FILE * __cdecl _popen(const char *, const char *);
Unable to find or execute POCC.EXE
option /P works
pocc command line switches in version 10 - match version 11
cc commands match too as MrBcx showed.
I would try using pocc directly with /E if that works it would appear to be an issue with cc.
then try cc after changing to the BIN directory.....because the error seems to be locating POCC
John Z
A this issue depends Windows OS version, so hopefully people inform in bug report also a Windows OS version too.
As poide have -x -xml commandline options, people can have several Pelles C versions in same PC :)
Just make a zip-package from Pelles C folder to USB-sticks.
I have Pelles C versions from 2.50 ->
EDIT:
Perhaps a safer way to test between versions
SET PellesCDirX=C:\code\PellesC11
SET PATH=%PellesCDirX%\bin
SET INCLUDE=%PellesCDirX%\include
SET LIB=%PellesCDirX%\lib;%PellesCDirX%\lib\Win
cc.exe -x -c -E prog.c
PAUSE
Quote from: TimoVJL on August 11, 2021, 04:30:05 PM
A this issue depends Windows OS version, so hopefully people inform in bug report also a Windows OS version too.
Very good point! Also should check IDE settings because help file indicates cc gets information from IDE not environment variables.
John Z
PS running windows 7 and windows 10 (last year I gave up on Windows ME ;D )
remove old attachment to free upload space