c/c++生成预编译文件
Preprocesses C and C++ source files and writes the preprocessed output to a file.
/P |
Remarks
The file has the same base name as the source file and an .i extension. In the process, all preprocessor directives are carried out, macro expansions are performed, and comments are removed. To preserve comments in the preprocessed output, use the /C (Preserve Comments During Preprocessing) option along with /P.
/P adds #line directives to the output, at the beginning and end of each included file and around lines removed by preprocessor directives for conditional compilation. These directives renumber the lines of the preprocessed file. As a result, errors generated during later stages of processing refer to the line numbers of the original source file rather than lines in the preprocessed file. To suppress the generation of #line directives, use /EP (Preprocess to stdout Without #line Directives) as well as /P.
The /P option suppresses compilation. It does not produce an .obj file, even if you use /Fo (Object File Name). You must resubmit the preprocessed file for compilation. /P also suppresses the output files from the /FA, /Fa (Listing File), /FA, /Fa (Listing File), and /Fm (Name Mapfile) options.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
Click the C/C++ folder.
Click the Preprocessor property page.
Modify the Generate Preprocessed File property.
To set this compiler option programmatically
See GeneratePreprocessedFile.
Example
The following command line preprocesses ADD.C, preserves comments, adds #line directives, and writes the result to a file, ADD.I:
Copy Code | |
---|---|
CL /P /C ADD.C |
c/c++生成预编译文件的更多相关文章
- iOS xcode6添加预编译文件
在xcode6以后,由于苹果不建议开发者乱用预编译文件,所以,在项目创建之后 就不会自动生成预编译文件. 那么如果我们想要使用预编译文件,就需要自己动手来添加.那到底该如何为我们的项目添加预编译文件呢 ...
- ASP.NET最误导人的错误提示:“未预编译文件,因此不能请求该文件”
昨天在一个ASP.NET MVC项目中,一个预编译后的视图访问时总是报错: 未预编译文件,因此不能请求该文件(The file has not been pre-compiled, and canno ...
- 怎么向Xcode6 IOS8之后向项目中添加预编译文件
苹果的XCode在6版本之后新建项目时取消了自动创建预编译头文件pch,该文件里存放的工程中一些不常被修改的代码,比如常用的框架头文件,这样做的目的提高编译器编译速度.我们可以往里面加入一些项目中都要 ...
- cocos 3.16 生成预编译库模板
打开模板功能 不知道什么原因,cocos 3.16关闭了模板功能,因此使用cocos -h命令时,无法显示gen-templates参数. 打开的方式也挺简单,打开tools/cocos2d-cons ...
- 问题处理:找不到Pch预编译文件?
提醒:Xcode6之后就不再自动创建Pch预编译文件 在Xcode6之前,创建一个新工程xcode会在Supporting files文件夹下面自动创建一个“工程名-Prefix.pch”文件,也是一 ...
- iOS开发之Xcode6 之手动添加Pch预编译文件
参考文档 http://blog.csdn.net/crazyzhang1990/article/details/44243343 红色部分为本人自己补充注意事项 在Xcode6之前,创建一个新工程x ...
- Xcode6之后创建Pch预编译文件
在Xcode6之前,创建一个新工程xcode会在Supporting files文件夹下面自动创建一个“工程名-Prefix.pch”文件,也是一个头文件,pch头文件的内容能被项目中的其他所有源文件 ...
- 使用pch预编译文件
首先新建一个pch文件,然后要修改这个项目的Build Setting中的Prefix Header 修改为 $(SRCROOT)/项目名称/预编译文件名: 一般pch文件的用处: 1.导入框架, ...
- IOS使用pch预编译文件
首先新建一个pch文件,然后要修改这个项目的Build Setting中的Prefix Header 修改为 $(SRCROOT)/项目名称/预编译文件名: 一般pch文件的用处: 1.导入框架,如: ...
随机推荐
- android 获取GPS定位
AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xm ...
- 终极报错解决方案:Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with
遇到这个报错的时候,不要慌 Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger fail ...
- Mac下安装和使用GunPG(GPG)
GPG是加解密的工具,亦可以用于签名.非对称加解密.需要公钥和私钥. mac下安装:brew install gpg 使用gpg工具校验下载文件的完整性,从官网下载KEYS和asc文件:gpg --i ...
- SilverLight:布局(3)StackPanel 对象
ylbtech-SilverLight-Layout: 布局(3)StackPanel 对象 A, Nesting Layout Containers(内嵌布局容器) B, StackPanel(队列 ...
- 关于SharePoint 讨论板的一些知识
关于SharePoint 讨论板的一些知识 近期公司项目可能要用到讨论板.需求是这种: 怎样在回复中仅仅让查看登陆者和讨论主题公布者的信息. 比方我公布 ...
- Linux Apache 给 awstats 创建 訪问password
CentOS7 安装最新版本号 awstats ,在httpd.conf 中增加了alias,能够直接訪问网址就进入 浏览.十分不安全. 给訪问加上password的方法: [root@localho ...
- Solaris分布式文件系统NFS
NFS存在的意思是让不同unix系统之间可以传输数据.这样可以合理的利用资源. 对每一个系统,建立一个NFS文件系统,进行数据的备份. NFS守护进程: nfsd mountd locked st ...
- DM8168 unrecoverable error: OMX_ErrorBadParameter (0x80001005) [resolved]
DM8168 custom board 成功启动系统之后想先測一下8168编解码功能,把开发包里的examples跑一遍.启动完毕后.连上HDMI显示,在starting Matrix GUI app ...
- hdu 5316 Magician 线段树
链接:http://acm.hdu.edu.cn/showproblem.php? pid=5316 Magician Time Limit: 18000/9000 MS (Java/Others) ...
- Kubernetes对象之ReplicaSet
系列目录 说到ReplicaSet对象,得先说说ReplicationController(简称为RC).在旧版本的Kubernetes中,只有ReplicationController对象.它的主要 ...