apt-get install binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-base gcc-mingw-w64-x86-64 gcc-mingw32 gfortran-mingw-w64-x86-64
mkdir build
cd build/
vim ../edge.c # 定制化
vim ../cmake/CMakeToolchainFileMingw32.cmake # 修改编译器:SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) 和SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
vim ../CMakeLists.txt # 注释掉benchmark: #add_executable(benchmark benchmark.c) 和 #target_link_libraries(benchmark n2n)
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/CMakeToolchainFileMingw32.cmake --build ./ ../
sed -i 's/CMAKE_RC_COMPILER-NOTFOUND/\/usr\/bin\/x86_64-w64-mingw32-gcc/g' CMakeCache.txt
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/CMakeToolchainFileMingw32.cmake --build ./ ../
make