![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
dayancn
这个作者很懒,什么都没留下…
展开
-
crash on a sockfd
In the program, it will use dlopen to get a function from a library. And the sockfd is defined in the main progrm, so when the function in the library will it caused a crash!That is because the ld d原创 2013-10-18 09:29:28 · 592 阅读 · 0 评论 -
print to console or file
/*----------------------------------------------------------------------*//* Debug for embeded board, 2008-2-26, Rain. *//*----------------------------------------------原创 2014-06-04 14:42:14 · 1248 阅读 · 0 评论 -
VC预编译时打印宏的值
VC预编译时打印宏的值#define ABC 5//首先定义两个辅助宏#define PRINT_MACRO_HELPER(x) #x #define PRINT_MACRO(x) #x"="PRINT_MACRO_HELPER(x)//显示宏的值 #pragma message(PRINT_MACRO(ABC))#pragma mess转载 2015-08-23 15:07:54 · 1778 阅读 · 0 评论 -
__FILE__显示全路径的问题
https://segmentfault.com/a/1190000000600442在日志中,使用到__FILE__来显示源码的文件名,可它显示了绝对路径,这样使得整个log看起来很长,主要log都显示在了右边,让人看着很是不舒服。查找了半天才知道这是编译造成的,由于编译目录和源码目录不同,所以在实际编译的时候使用的是源码的绝对路径,以致打印出来就是绝对路...转载 2018-04-20 16:59:45 · 8792 阅读 · 2 评论