VC Preprocessor definitions
来源:互联网 发布:js图片轮播代码考试 编辑:程序博客网 时间:2024/06/06 01:19
- 在项目上点击右键->setting->C/C++->Preprocessor definitions
- 在里面加入自定义预编译头_SB2
- 测试代码:
#include "stdafx.h"#include <stdio.h>#include <stdlib.h>int main(int argc, char* argv[]){#ifdef _SB printf("调用了sb\n");#elif _SB2 printf("调用了sb2\n");#else printf("Hello World!\n");#endif return 0;}
输出:调用了sb2
这种方法可以用来设置编译多个版本,比如debug版本和release版本的区别,如果你要编译debug1版本和debug2版本,就可以使用上面的方法,不用编译两个代码。
2 0
- VC Preprocessor definitions
- CoInitializeEx,PreProcessor definitions => 加上,_WIN32_DCOM
- VS2013 里的Preprocessor definitions 有bug
- Definitions
- Definitions
- Preprocessor Directives
- C preprocessor
- C preprocessor
- C preprocessor
- preprocessor-宏
- The preprocessor
- Bug definitions
- 4. Definitions
- Structure Definitions
- Consistency Definitions
- boost::preprocessor库简介
- Preprocessor Operators(#、#@、##)
- 宏(preprocessor)系列 chips
- 杭电ACM3415——Max Sum of Max-K-sub-sequence
- tomcat远程debug配置详解
- rpmbuild编译时出现的问题
- linux下C函数---fscanf和fprintf的使用
- android studio 导入自定义编码格式
- VC Preprocessor definitions
- Myeclipse或Eclipse 老是出现JPA project Change Event Handler
- Java中List的排序 Comparable和 Compartor
- 非oracle用户无法登陆数据库 ora 12547
- UISearchBar和 UISearchDisplayController的使用
- SharePoint 2013的社交功能之(三)规划Mysite
- Linux 平时用到的基本命令
- Freescale WINCE 6.0休眠唤醒后声音消失,原因居然是驱动线程优先级不够
- 111