Re: Help is needed to compile C program using Visual Studie 2005

Tech-Archive recommends: Fix windows errors by optimizing your registry




wtxwtx@xxxxxxxxx wrote:
//#define Chip_A
//#define Chip_B
//#define Chip_C
#define Chip_D

#include "stdafx.h"
#include <sys/stat.h> // for constant _S_IWRITE in chmod()
#include <stdio.h>
#include <io.h>

No, no, no.

#include "stdafx.h" must be the first non-blank non-comment line in the
file. I'm assuming you are using pre-compiled headers as it is the
default option. You are trying to define the Chip_D first. Move that to
after the inclusion of the header files (or at least after stdafx.h)

.