Visual Studio

GDB/Clang

Docker

WSL

Cygwin

Cygwin 和MinGW 的区别与联系是怎样的? - LiTuX的回答 - 知乎

MSYS2

  • 配置下载源

image.png

  • pacman -Syu ```shell $ pacman -Syu :: 正在同步软件包数据库… mingw32 1554.4 KiB 923 KiB/s 00:02 [#####################] 100% mingw64 1562.1 KiB 236 KiB/s 00:07 [#####################] 100% ucrt64 1623.4 KiB 1126 KiB/s 00:01 [#####################] 100% clang64 1549.8 KiB 429 KiB/s 00:04 [#####################] 100% msys 382.4 KiB 261 KiB/s 00:01 [#####################] 100% :: Starting core system upgrade… 警告:terminate other MSYS2 programs before proceeding 正在解析依赖关系… 正在查找软件包冲突…

软件包 (2) mintty-1~3.6.0-1 pacman-6.0.1-13

下载大小: 6.27 MiB 全部安装大小: 34.40 MiB 净更新大小: 0.13 MiB

:: 进行安装吗? [Y/n]

  1. - `pacman -Su`
  2. ![image.png](https://cdn.nlark.com/yuque/0/2022/png/1599044/1649733204257-b80553e5-0847-4788-b1dc-0a70e10c8cee.png#clientId=u312cf49a-c828-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=263&id=ua9c54cf8&margin=%5Bobject%20Object%5D&name=image.png&originHeight=263&originWidth=328&originalType=binary&ratio=1&rotation=0&showTitle=false&size=69695&status=done&style=none&taskId=u79920777-0d6b-44d4-a4fb-d5fd42d5bbf&title=&width=328)
  3. ```shell
  4. $ pacman -Su
  5. :: Starting core system upgrade...
  6. 今日无事可做
  7. :: 正在进行全面系统更新...
  8. 正在解析依赖关系...
  9. 正在查找软件包冲突...
  10. 软件包 (23) bsdtar-3.5.3-2 curl-7.82.0-1 file-5.41-3 findutils-4.9.0-2
  11. gdbm-1.22-3 glib2-2.70.5-1 gzip-1.12-1 info-6.8-4
  12. libcurl-7.82.0-1 libexpat-2.4.8-1 libgcrypt-1.10.1-4
  13. libgdbm-1.22-3 libgnutls-3.7.4-2 libgpg-error-1.44-2
  14. libgpgme-1.17.0-2 libnghttp2-1.47.0-2 libreadline-8.1.002-1
  15. libsqlite-3.38.2-1 libtasn1-4.18.0-3 libxml2-2.9.13-1
  16. libxslt-1.1.35-1 ncurses-6.3-1 zlib-1.2.12-1
  17. 下载大小: 11.16 MiB
  18. 全部安装大小: 49.43 MiB
  19. 净更新大小: 0.31 MiB
  20. :: 进行安装吗? [Y/n]
  • pacman -Sy base-devel ```shell $ pacman -Sy base-devel :: 正在同步软件包数据库… mingw32 已经是最新版本 mingw64 已经是最新版本 ucrt64 已经是最新版本 clang64 已经是最新版本 msys 已经是最新版本 正在解析依赖关系… 正在查找软件包冲突…

软件包 (16) binutils-2.37-5 bison-3.8.2-3 diffstat-1.64-1 diffutils-3.8-3 dos2unix-7.4.2-1 flex-2.6.4-2 gperf-3.1-4 groff-1.22.4-3 m4-1.4.19-2 make-4.3-3 patch-2.7.6-1 pkgconf-1.8.0-1 tar-1.34-2 texinfo-6.8-4 texinfo-tex-6.8-4 base-devel-2022.01-1

下载大小: 11.63 MiB 全部安装大小: 72.31 MiB

:: 进行安装吗? [Y/n]

<a name="OmeLt"></a>
### GCC

- `pacman -S --needed base-devel mingw-w64-x86_64-toolchain`
```shell
$ pacman -S mingw-w64-x86_64-toolchain
:: 在组 mingw-w64-x86_64-toolchain 中有 19 成员:
:: 软件仓库 mingw64
   1) mingw-w64-x86_64-binutils  2) mingw-w64-x86_64-crt-git  3) mingw-w64-x86_64-gcc  4) mingw-w64-x86_64-gcc-ada  5) mingw-w64-x86_64-gcc-fortran  6) mingw-w64-x86_64-gcc-libgfortran
   7) mingw-w64-x86_64-gcc-libs  8) mingw-w64-x86_64-gcc-objc  9) mingw-w64-x86_64-gdb  10) mingw-w64-x86_64-gdb-multiarch  11) mingw-w64-x86_64-headers-git  12) mingw-w64-x86_64-libgccjit
   13) mingw-w64-x86_64-libmangle-git  14) mingw-w64-x86_64-libwinpthread-git  15) mingw-w64-x86_64-make  16) mingw-w64-x86_64-pkgconf  17) mingw-w64-x86_64-tools-git  18) mingw-w64-x86_64-winpthreads-git
   19) mingw-w64-x86_64-winstorecompat-git


输入某个选择 ( 默认=全部选定 ): 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19

pacman -S --needed base-devel mingw-w64-x86_64-toolchain

Clang

https://zhuanlan.zhihu.com/p/334520673
https://www.bilibili.com/read/cv11583320

pacman -S mingw64/mingw-w64-x86_64-clang

image.png

  • Manually-specified variables were not used by the project:

    CMake Warning:
    Manually-specified variables were not used by the project:
    
      CMAKE_CXX_COMPILER
    

    CLion

    image.png

  • Toolchains

image.png

  • CMake

image.png
image.png
image.png

  • VS只是C++编译器

image.png
image.png
image.png
image.png