Error "No target architecture"

Started by tumanovalex, November 10, 2011, 10:00:53 AM

Previous topic - Next topic

tumanovalex

In program#include <locale.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <windows.h>

int main(int argc, char *argv[])
{
  setlocale(LC_ALL, "");
  char sDisk[] = "C:";
  DWORD nByteRead = 0, nSectorPerCluster = 0, nBytesPerSector = 0, nFreeClusters = 0, nClustersForUser = 0;
  if(GetDiskFreeSpace((LPCTSTR)sDisk, &nSectorPerCluster, &nBytesPerSector, &nFreeClusters, &nClustersForUser)==0)
    {
      printf("\nCan't find disk %s!\n", sDisk);
      _getch();
      exit(1);
    }
  printf("\nSectorPerCluster - %Li\nnBytesPerSector - %Li\nFreeClusters - %Li\nClustersForUser - %Li\n\n",
             nSectorPerCluster, nBytesPerSector, nFreeClusters, nClustersForUser);
  return 0;
}
error:
Building main.obj.
C:\Program Files\PellesC\Include\Win\winnt.h(558): fatal error #1014: #error: "No target architecture". *** Error code: 1 ***
Help me, please!

Stefan Pendl

---
Stefan

Proud member of the UltraDefrag Development Team

iZzz32

tumanovalex, check Compiler->Enable Microsoft extensions in Project options or use -Ze flag if you're compiling from the command line.

tumanovalex

Thanks big! Henceforth I will try to be more attentive!