NO

Author Topic: Error "No target architecture"  (Read 12044 times)

tumanovalex

  • Guest
Error "No target architecture"
« on: November 10, 2011, 10:00:53 AM »
In program
Code: [Select]
#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!

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Error "No target architecture"
« Reply #1 on: November 10, 2011, 11:01:33 AM »
How did you set up your project?
---
Stefan

Proud member of the UltraDefrag Development Team

iZzz32

  • Guest
Re: Error "No target architecture"
« Reply #2 on: November 10, 2011, 01:15:17 PM »
tumanovalex, check Compiler->Enable Microsoft extensions in Project options or use -Ze flag if you're compiling from the command line.

tumanovalex

  • Guest
Re: Error "No target architecture"
« Reply #3 on: November 12, 2011, 09:41:14 AM »
Thanks big! Henceforth I will try to be more attentive!