1、参考基于Windows下的eclipse的C++开发环境搭建学习了环境搭建,并正常使用。
2、问题:我在使用过程,我发现首次运行,要手动build,然后run as local;后面再修改代码就可以随时运行了。
3、工具不顺手,那就多查查资料,查看官网后,我发现,官网说明如下:
Windows
For windows, MinGW and Cygwin are the two main platform choices for acquiring the GNU toolchain. It is important to understand the difference between them. Cygwin produces executables that use the Cygwin POSIX runtime. Note that this runtime is GPL licensed. MinGW produces native Windows executables that do not require a separate runtime.
-
For MinGW, it is recommended to use the MSYS2 software distribution. The CDT will automatically detect tools that are installed using the MSYS2 package manager. Download and run the latest MSYS2 installer by following instructions on the MSYS2 Getting Started page. When you reach the UCRT64 environment prompt, use the following commands to install individual tools:
Tool Installation command Notes clang pacman -S mingw-w64-ucrt-x86_64-clang Provides the LLVM with Clang toolchain clangd pacman -S mingw-w64-ucrt-x86_64-clang-tools-extra Required by the C/C++ Editor (LSP) cmake pacman -S mingw-w64-ucrt-x86_64-cmake Required for building CMake projects gcc pacman -S mingw-w64-ucrt-x86_64-gcc Provides the MinGW GCC toolchain gdb pacman -S mingw-w64-ucrt-x86_64-gdb Required for debugging make pacman -S make Required for building Managed Build projects ninja pacman -S mingw-w64-ucrt-x86_64-ninja Required for building CMake projects
4、基于官网,就需要下载MSYS2 并按照上表安装即可,不需要配置环境变量等。
5、安装MSYS2也比较简单,参考官方文档一步一步安装即可。
6、实际使用感受,创建项目就使用Cmake project即可,直接运行即可,很方便。