Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Fatal error C1010 when building MicroSoft VS project

Status
Not open for further replies.

PeteGallo

Newbie level 3
Newbie level 3
Joined
Aug 15, 2005
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
stdio.h fatal error c1010

hello

i receive a fatal error when i build my MicroSoft VS. project:
fatal error C1010: unexpected end of file while looking for precompiled header.

Code:
/********************************************************************/
/*      CanOpen test program.                                       */
/*      Master's Productions                                        */
/*      created by: Pietro Gallo                                    */
/* -----------------------------------------------------------------*/
/*      Filename:	canOpen_dtu.c                                   */
/*      Date:		Jan.22.2006                                     */
/*      Language:	ANSI C                                          */
/*      O.S.:		32 bit Windows (_WIN32)                         */
/*      Purpose:    establish communications with CBM-DIO8          */
/*                                                                  */
/********************************************************************/

#include "mcanopen.h"
#include <stdio.h>
#include <math.h>

#define CAN_NET       0   /* number of CAN interface */
#define CAN_BAUDRATE  6   /* baudrate */

int main()

{
	canCalSetBaudrate(CAN_NET, CAN_BAUDRATE);
	return 0;
}

any guesses?

Thank You
Pete Gallo
 

Re: fatal error C1010

This error comes if you create a project with MFC project wizard.

MFC programs use many libraries, requiring the use of many header files. All these refferences are clubbed to a header file "stdafx.h" stands for application framework.

When compiling each source (.cpp) file, the compiler pass through the source, looking for the directive:

#include "stdafx.h"

If your source file doesn't contain this directive, you get the C1010 error described above.

The simple solution is to insert the include directive at the begining of your source file.

Cheers
idlebrain
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top