c/c++生成预编译文件
来源:互联网 发布:linux下usb通讯编程 编辑:程序博客网 时间:2024/06/05 14:36
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:
CL /P /C ADD.C
- c/c++生成预编译文件
- keil4中生成预编译文件
- aspnet_compiler预编译文件
- C++预编译文件
- 添加预编译文件
- Xcode6 新建预编译文件
- 如何创建预编译文件
- 预编译文件prefix header
- 创建.pch预编译文件
- .pch文件预编译文件
- 创建Pch预编译文件
- iOS预编译文件添加
- 无法打开预编译文件的解决方法
- 预编译文件造成的错误
- 为Xcode6 添加预编译文件 .pch
- IOS添加pch预编译文件
- 自动创建Pch预编译文件
- 添加预编译文件 ,定义宏
- (转)使用cygwin注意事项一
- 使用cygwin注意事项二
- vim 使用、设置笔记
- (转)vim 访问系统剪贴板
- 003云数据中心基础原理笔记
- c/c++生成预编译文件
- 注意!!一定要谨慎使用c/c++原生指针
- 安卓解决listview的item嵌套多个edittext的问题
- ctags使用
- Windows下使用vim编写代码,使用nmake编译代码,使用vs来调试代码
- react native测量组件的宽高
- 递归递推练习―F―计算组合数
- 继承的设计技巧
- 海思芯片分辨率和码率、流量之间的关系