码迷,mamicode.com
首页 >  
搜索关键字:ifdef    ( 750个结果
跨平台的EVENT事件 windows linux(转)
#ifndef _HIK_EVENT_H_ #define _HIK_EVENT_H_ #ifdef _MSC_VER #include #define hik_event_handle HANDLE #else #include typedef struct { bool state; bool ... ...
分类:Windows程序   时间:2017-08-20 17:03:59    阅读次数:224
在Debug模式下中断, 在Release模式下跳出当前函数的断言
在Debug模式下中断, 在Release模式下跳出当前函数的断言 #ifdef DEBUG #define __breakPoint_on_debug asm("int3") #else #define __breakPoint_on_debug #endif // 验证 #define UXY_ ...
分类:其他好文   时间:2017-08-12 12:37:15    阅读次数:123
dll开发相关头文件约定
#define __EXPORTS 1 #ifdef __cplusplus #ifdef __EXPORTS #define DLL_EXPORT extern "C" __declspec (dllexport) #else #define DLL_EXPORT extern "C" __dec... ...
分类:其他好文   时间:2017-08-10 18:10:18    阅读次数:149
预处理指令
预处理指令在编译之前,由编译器执行,预处理结果作为编译器的输入。主要功能:把其他文件包含到当前文件、定义符号常量和宏、程序代码的条件编译以及预处理指令的条件执行。预处理指令包括:#include, #define, #error, #if, #else, #elif, #endif, #ifdef,... ...
分类:其他好文   时间:2017-08-09 16:51:58    阅读次数:109
QT静态库和动态库的导出
因为静态库是不须要导出的。所以在写QT的前置声明的时候须要说明 #if defined(QT_SHARED) #ifdef COMMONLIB #define COMMONLIB_EXPORT Q_DECL_EXPORT #else #define COMMONLIB_EXPORT Q_DECL_I ...
分类:其他好文   时间:2017-07-29 21:33:13    阅读次数:131
String,CString,TCHAR,char之间区别和联系
TCHAR是一种字符串类型,它让你在以MBCS和UNNICODE来build程序时可以使用同样的代码,不需要使用繁琐的宏定义来包含你的代码,而char代表ASCII的字符 #ifdef UNICODE typedef wchar_t TCHAR; #else typedef char TCHAR; ...
分类:其他好文   时间:2017-07-28 23:45:06    阅读次数:179
【转】#ifdef __cplusplus+extern "C"的用法
时常看到别人的头文件中,有这样的代码: 这样的代码到底是什么意思呢?首先,__cplusplus是cpp中的自定义宏,那么定义了这个宏的话表示这是一段cpp的代码,也就是说,上面的代码的含义是:如果这是一段cpp的代码,那么加入extern "C"{,和 }处理其中的代码。 要明白为何使用exter ...
分类:其他好文   时间:2017-07-22 18:14:46    阅读次数:160
C++项目中的extern "C" {}
引言 在用C++的项目源码中,经常会不可避免的会看到下面的代码: 1 2 3 4 5 6 7 8 9 #ifdef __cplusplus extern "C" { #endif /*...*/ #ifdef __cplusplus } #endif 1 2 3 4 5 6 7 8 9 #ifdef ...
分类:编程语言   时间:2017-07-19 17:43:57    阅读次数:220
一个打印调试信息的样例
作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz #include <stdio.h> #define HAOYU_DEBUG_TYPE #ifdef HAOYU_DEBUG_TYPE #define HAOYU_DEBUG(...) \ do { \ printf ...
分类:其他好文   时间:2017-07-17 23:46:59    阅读次数:201
跨平台的EVENT事件 windows linux
#ifndef _HIK_EVENT_H_ #define _HIK_EVENT_H_ #ifdef _MSC_VER #include <Windows.h> #define hik_event_handle HANDLE #else #include <pthread.h> typedef st ...
分类:Windows程序   时间:2017-07-15 12:52:03    阅读次数:353
750条   上一页 1 ... 18 19 20 21 22 ... 75 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!