I am trying out Pelles C for the first time. I am trying to compile a 32-bit Windows console-mode program. This program calls a few Windows API functions. I have the following line near the top of my file:
#include <windows.h>
When attempting to compile the program I get:
Building rdcards.obj.
C:\Program Files\PellesC\Include\Win\winnt.h(105): fatal error 1014: #error: "No Target Architecture".
*** Error code: 1***
Done.
That error message seems to be coming from these lines in winnt.h:
#if defined(_AMD64_) || defined(_X86_)
#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD)
#elif !defined(RC_INVOKED)
#error "No Target Architecture"
#endif
I tried adding
#define _X86_
to my program but that just caused more errors, so that doesn't appear to be the correct fix.
This program compiles fine with MS Visual Studio 2017, TinyC and MinGW.
What am I missing?
Thanks,
Charles Bailey