码迷,mamicode.com
首页 >  
搜索关键字:ifdef    ( 750个结果
iOS笔记:Objective-C自定义NSLog宏
/* ?XCode?LLVM?XXX?-?Preprocessing中Debug会添加?DEBUG=1?标志 ?*/ #ifdef?DEBUG #define?NSLog(FORMAT,?...)?fprintf(stderr,"%s:%d\t%s\n",[[[NSString?stringWithUTF8String:__FILE__]?lastP...
分类:移动开发   时间:2014-07-21 10:34:03    阅读次数:244
2.2 为路径名动态分配空间
lib/pathalloc.c#include "apue.h"#include #include #ifdef PATH_MAXstatic int pathmax = PATH_MAX;#elsestatic int pathmax = 0;#endif#define SUSV3 200112L...
分类:其他好文   时间:2014-07-19 19:34:54    阅读次数:280
windows内存泄漏监测
之前使用vld检测内存泄露,有兴趣可以一观:http://blog.csdn.net/alex_my/article/details/11488805控制台下,MFC未测试。使用方法如下:#include ifdef _DEBUGdefine new new(_NORMAL_BLOCK, __FIL...
分类:Windows程序   时间:2014-07-19 13:32:03    阅读次数:249
2.3 确定文件描述符数
lib/openmax.c#include "apue.h"#include #include #ifdef OPEN_MAXstatic long openmax = OPEN_MAX;#elsestatic long openmax = 0;#endif/* * If OPEN_MAX is i...
分类:其他好文   时间:2014-07-18 23:36:31    阅读次数:279
iOS: #ifdef DEBUG
开发时,经常用到NSLog,但release是又想一次过清掉all NSLog,方法是:在xxx-Prefix.pch里添加[cpp]view plaincopy#ifdefDEBUG#defineDLog(...)NSLog(__VA_ARGS__)#else#defineDLog(...)/**...
分类:移动开发   时间:2014-07-18 21:05:57    阅读次数:221
使用dll,将image库开放出去
这是很经典的想法了,但是如何来做,不经过摸索不知道细节。最简单:dll处#include"stdafx.h"#ifdef_DEBUG#definenewDEBUG_NEW#endif#defineDllExport_declspec(dllexport)DllExportdoubleaValue =...
分类:其他好文   时间:2014-07-16 18:11:18    阅读次数:174
VS2005内存泄漏检测方法[转载]
一、非MFC程序可以用以下方法检测内存泄露:1. 程序开始包含如下定义:#ifdef _DEBUG#define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)#else#define DEBUG_CLIENTBLOCK#endif...
分类:其他好文   时间:2014-07-16 15:08:37    阅读次数:295
linux时间方面的设置
如下一段代码可以借鉴:static void _sleep_response_timeout(modbus_t *ctx) { #ifdef _WIN32 /* usleep doesn't exist on Windows */ Sleep((ctx->response_timeout.tv_sec * 1000) + (ctx->response_timeo...
分类:系统相关   时间:2014-07-10 20:42:13    阅读次数:303
mtk开发
mtk套接字所有的声明放在soc_api.h条件编译命令最常见的形式为:?12345#ifdef标识符 //程序段1 #else //程序段2 #endif它的作用是:当标识符已经被定义过(一般是用#define命令定义),则对程序段1进行编译,否则编译程序段2。
分类:其他好文   时间:2014-07-09 16:37:40    阅读次数:233
条件编译(#ifdef #else #endif #if)
条件编译(#ifdef #else #endif #if)...
分类:其他好文   时间:2014-07-02 09:15:09    阅读次数:329
750条   上一页 1 ... 68 69 70 71 72 ... 75 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!