CLion OpenMP

下载 TDM-GCC http://tdm-gcc.tdragon.net/download
安装时要勾选 openmp

编辑 CMakeLists.txt,添加 -fopenmp
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fopenmp")
更多...

Windows GCC 编译 JsonCpp

下载JsonCpp https://github.com/open-source-parsers/jsoncpp/releases

安装Python 2.7.12
安装SCons 2.5.0 http://scons.org/pages/download.html
cd jsoncpp-1.7.7

jsoncpp-1.7.7python C:\Python27\Scripts\scons.py platform=mingw

会生成静态库 .\buildscons\mingw\src\lib_json\libjson_mingw_libmt.a

cd .\buildscons\mingw\src\lib_json\
json_reader.o
json_value.o
json_writer.o
libjson_mingw_libmt.a

拷贝 include 和 buildscons\mingw\src\lib_json\ 目录到项目目录下

如果使用的是Clion,修改CMakeLists.txt,添加
target_link_libraries(net ${CMAKE_SOURCE_DIR}/lib_json/libjson_mingw_libmt.a)

测试程序:

#include 
#include "include/json/json.h"

using namespace std;

int main(int argc, char 
更多...