fatal error C1010: unexpected end of file while looking for precompiled header directive
错误指向空行。
代码
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs *//* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue Mar 26 09:33:35 2002
*/
/* Compiler settings for D:\rsgldll\ArrangeClass\ArrangeClass.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;#endif // __IID_DEFINED__#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINEDconst IID IID_IManage = {0x59D1874E,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
const IID LIBID_ARRANGECLASSLib = {0x59D18740,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
const CLSID CLSID_Manage = {0x59D1874F,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
#ifdef __cplusplus
}
#endif--》错误指到这里。
错误指向空行。
代码
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs *//* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Tue Mar 26 09:33:35 2002
*/
/* Compiler settings for D:\rsgldll\ArrangeClass\ArrangeClass.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;#endif // __IID_DEFINED__#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINEDconst IID IID_IManage = {0x59D1874E,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
const IID LIBID_ARRANGECLASSLib = {0x59D18740,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
const CLSID CLSID_Manage = {0x59D1874F,0x21EC,0x11D5,{0x85,0x43,0x00,0x50,0xBA,0xD0,0x7F,0x0E}};
#ifdef __cplusplus
}
#endif--》错误指到这里。
1:在project-》seeting中在project options 中去掉/Fp"Debug/SCDraw.pch" /Yu"stdafx.h"
2:切换到文件浏览模式,右键单击-》setting-》c/c++(tab)->precomplie headers(category中选择),如果是stdafx.cpp,选中radio "create precomplied headers (.pch)",下面框里输入stdafx.h.
对于所有其他的.cpp文件,选择"use procomplied header files",下面框里输入stdafx.h
其实这个文件是由mfc自动生成的,这是创建程序时选择了支持自动化选项(或程序是一个atl程序)。
d:\rsgldll\arrangeclass\arrangeclass_p.c(229) : fatal error C1189: #error : You need a Windows NT 4.0 or later to run this stub because it uses these features:这个文件也是自动生成的
原代码:
#if !(TARGET_IS_NT40_OR_LATER)
-----------下面是错误提示所在行
#error You need a Windows NT 4.0 or later to run this stub because it uses these features:
#error -Oif or -Oicf, [wire_marshal] or [user_marshal] attribute, float, double or hyper in -Oif or -Oicf, more than 32 methods in the interface.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
#endif