Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Fatal error C1010 when building MicroSoft VS project

Status
Not open for further replies.

PeteGallo

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
 

idlebrain

Advanced Member level 4
Joined
Jul 20, 2005
Messages
107
Helped
20
Reputation
40
Reaction score
1
Trophy points
1,298
Activity points
2,501
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top