vc写的dll被mingw的g++编译引用
摘要:dll.cpp,用vc2017编译 #include <iostream>#include <windows.h> extern "C" __declspec(dllexport) void Go() { std::cout << "go" << std::endl;} BOOL APIENTRY
阅读全文
posted @
2018-05-28 17:38
袁晓平
阅读(336)
推荐(0)
rar压缩find查找到的文件
摘要:find . -name 'CMakeLists.txt' | xargs /d/Program\ Files/WinRAR/rar.exe a -r ./out.rar $ [Linux]可用于管道操作的命令 管道命令——| command1 | command2 | command3 注:管道命
阅读全文
posted @
2018-05-24 16:28
袁晓平
阅读(1129)
推荐(0)
libuv示例代码
摘要:https://github.com/nikhilm/uvbook/tree/master/code
阅读全文
posted @
2018-05-22 14:41
袁晓平
阅读(350)
推荐(0)
整型数字转utf8
摘要:static std::string codePointToUTF8(unsigned int cp){ std::string result; // based on description from http://en.wikipedia.org/wiki/UTF-8 if (cp <= 0x7
阅读全文
posted @
2018-05-16 10:19
袁晓平
阅读(282)
推荐(0)
cmake构建时指定编译器架构(x86 or x64)
摘要:vs2015 x64编译器为例,cmake命令如下: vs2015 x64编译器为例,cmake命令如下: Xml代码 cmake -G "Visual Studio 14 Win64" path\to\source\dir 去掉Win64,就是32bit: Xml代码 cmake -G "Visu
阅读全文
posted @
2018-05-15 23:50
袁晓平
阅读(1368)
推荐(0)
tcp echo server libuv
摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <uv.h>#define DEFAULT_PORT 7000#define DEFAULT_BACKLOG 128uv_loop_t *loop;struct sock
阅读全文
posted @
2018-05-13 21:12
袁晓平
阅读(236)
推荐(0)