编译freetyp问题。#include expected a filename, found 'identifier'
来源:互联网 发布:淘宝自学网视频教程 编辑:程序博客网 时间:2024/06/05 16:49
自己建立vc工程,编译freetype时,出错。
#include expected a filename, found 'identifier'
解决办法:
禁掉VC的precompiled headers。
工程Settings->C/C++->Category(Precompiled Headers)
选择Not Using precompiled headers
What are precompiled headers?
Often C++ source files include headers from external libraries. In Windows you includewindows.h
. These header files are often very large and takes some time to process. Each time you compile a C++ file the compiler has to read and process thousands of lines from these header files. But external libraries don't change and you can save a lot of time if you only process these files once and save the result.
A precompiled header is simply a bunch of header files that has been processed to an intermediate form that later can be used by the compiler again and again.
Precompiled headers in Visual C++
In Visual C++ it is customary to put all your non-changing header files in stdafx.h
. You then instruct the compiler to create the precompiled header stdafx.pch
while compiling stdafx.cpp
. If you want to use the precompiled header in another.cpp
file you have to include stdafx.h
as the first include file and the instruct the compiler to usestdafx.pch
for your precompiled header.
If you get an error about not including stdafx.h
you simply have to instruct the compiler to not use a precompiled header for that particular source file. (Or you can includestdafx.h
.)
Precompiled header settings for individual source files
Visual C++ allows you to control the compiler settings for the entire project and for individual files. To access individual properties you select the source file in the solution explorer, right click it and selectProperties from the context menu. The options for precompiled headers are found atConfiguration Properties => C/C++ => Precompiled Headers. If you modify these settings you will often want to do that for all configurations (e.g.Debug and Release).
When you are using precompiled headers you will have a setting for the entire project that instructs the compiler to usestdafx.pch
for the precompiled header. The stdafx.cpp
will have an individual settings that instructs the compiler to generatestdafx.pch
, and if you have some source files that doesn't include stdafx.h
you can set individual settings on these to not use precompiled headers.
- 编译freetyp问题。#include expected a filename, found 'identifier'
- 'filename.h' file not found with <angled> include, use "quotes" instead. 问题详解
- microsoft sdks\windows\v6.0a\include\gdiplustypes.h(658) : error C3861: 'min': identifier not found
- maven 编译java工程:<identifier> expected
- linux内核编译错误:“include/asm is a directory but a symlink was expected ”
- linux内核编译错误:“include/asm is a directory but a symlink was expected ”解决与分析
- include<filename>和#include"filename"的区别
- 编译警告 NEWLINE EXPECTED EXTRA CHARACTERS FOUND
- CCS 项目编译 出现 expected an identifier 错误
- #include expects "FILENAME" or 一个很隐蔽的问题
- 关于'GetModuleHandleEx': identifier not found的问题
- expected identifier before numeric constant 问题的解决
- expected identifier or '(' before 'struct' GCC 报错问题
- Expected identifier or '('
- error:include/asm is a directory but symlink was expected
- keil C编译error : expected a ")"
- #include <filename.h> 和 #include “filename.h”有什么 区别
- #include<filename.h>和#include"filename.h"用法区别
- iOS 生成 UUID(GUID)
- Android eclipse中程序调试
- 内存泄漏的跟踪
- IOS iOS平台XML解析类库对比和安装说明
- Coding Style 转自Stanford CS106A Handout #7
- 编译freetyp问题。#include expected a filename, found 'identifier'
- 程序算法与人生选择 转
- Cocos2D-HTML5 JSBinding Android编译指南
- android 蓝牙开发
- python 用ping循环监测服务器心跳
- GIT 小型项目的简单应用
- eclipse中设置字体大小
- 表单提交不刷新页面
- 移动应用设计中应避免的十种错误