I am trying to run C:\MinGW\bin\cpp.exe -v -o main.txt test.c
on test.c:
#ifdef HELLO
HELLO!
#else
BYE!
#endif
but only get the following output, no apparent error, and no main.txt
is written (nor any other file):
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\cpp.exe
Target: mingw32
Configured with: ../src/gcc-8.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-8.2.0-5' --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-isl=/mingw --enable-libgomp --disable-libvtv --enable-nls --disable-build-format-warnings
Thread model: win32
gcc version 8.2.0 (MinGW.org GCC-8.2.0-5)
COLLECT_GCC_OPTIONS='-E' '-v' '-o' 'main.txt' '-mtune=generic' '-march=i586'
c:/mingw/bin/../libexec/gcc/mingw32/8.2.0/cc1.exe -E -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/8.2.0/ test.c -o main.txt -mtune=generic -march=i586
I've found Denis Auroux / Tristan Miller's GPP and a windows build which works as expected (
gpp.exe -o main.txt test.c
- actually, you'll want the -C
option, see the docs), but I'm still interested in what the problem is with my usage of cpp.