still the problem of "No target architecture"

Started by Nicky, May 22, 2014, 04:24:25 PM

Previous topic - Next topic

Nicky

First, I creat a console
And then, I write the code below
#include<graphics.h>
void main()
{
initgraph(1000,1000);
line(100,100,300,300);
lineto(400,500);
linerel(200,200);
getch();
}



But, when I compile, it goes wrong with "PellesC\Include\Win\winnt.h(559): fatal error #1014: #error: "No target architecture".
"
I tried the "Enable Microsoft extensions" in the project opinion, but it didn't work.
Thanks in advance.

DMac

Try putting the following at the top of your source.

#ifndef _M_IX86
#define _M_IX86
#endif
No one cares how much you know,
until they know how much you care.

Nicky

Quote from: DMac on May 22, 2014, 06:04:06 PM
Try putting the following at the top of your source.

#ifndef _M_IX86
#define _M_IX86
#endif



I tried, but it didin't work. Thanks for your help.

frankie

"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Nicky


frankie

#5
Quote from: Nicky on May 23, 2014, 04:15:02 PM
Thanks for your help.
But it didn't work.

The error is generated in winnt.h with a #pragma message.
This means that that file is included in some way. All related architecture definitions are genereted starting from windows.h.
From your snippet we can't do any inference about the problem.
You have two possibilities:

  • Provide us with a sample that we can check (post a minimal project with all files required to reproduce the problem)
  • Check your installation, removing PellesC and reinstalling as administrator, to be sure that all paths are defined and required files are present and accessible.

P.S. If you are trying to include old Borland graphics.h (16 bit version) it will not work because PellesC is a 32/64 bits compiler.
If you are trying to use WinBGI or alike it will not work because these are C++ libraries.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide