NO

Author Topic: No Target Architecture error  (Read 3111 times)

bobd

  • Guest
No Target Architecture error
« on: March 05, 2014, 06:35:56 PM »
If I use either a WIN32 or a WIN64 Console project, I cannot use #include <windows.h>.  It always generates a 'No target architecture' error.  However, #include <windows.h> works fine in non-console applications.  The error is generated in winnt.h (559).  Can anyone suggest a fix?  Thank you.

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: No Target Architecture error
« Reply #1 on: March 05, 2014, 09:42:10 PM »
This compiles fine:

#include <windows.h>
int main(void)
{
   printf("hi, I am a console app");
   getchar();
   return 0;
}

...PellesC\Bin\pocc.exe -Tx86-coff -Ze -Zi -fp:precise -W2 %~dpn1.c -Fo"%~dpn1.obj"
...PellesC\Bin\polink -subsystem:%oSusy% -machine:x86 "%~dpn1.obj" kernel32.lib user32.lib

bobd

  • Guest
Re: No Target Architecture error
« Reply #2 on: March 06, 2014, 02:08:24 AM »
I enabled Microsoft extensions and everything worked.  Thank you bot for your replies.