Clion和MinGW安装
1.clion安装地址
https://www.jetbrains.com/clion/
2.MinGW安装
总地址: https://sourceforge.net
具体下载地址:https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/
3.配置Clion
先把MinGw配置到环境变量path里面
然后配置settings的toolchains
记得CMake也要配置
可能你同时安装了Cygwin64和MinGW可能会导致下列问题(我Clion里面只用MinGW编译)
C:\Users\lenovo>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe Target: mingw32 Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=m ingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-i sl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune= generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='Min GW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwar f2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libic onv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable -libgomp --disable-libvtv --enable-nls Thread model: win32 gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
就是配置一下CMake就解决了
接着就运行成功了 "Hello, World!"