首页 > 系统相关 >windows11+gcc安装-good

windows11+gcc安装-good

时间:2023-06-27 17:15:13浏览次数:49  
标签:gcc good version -- windows11 w64 Mingw path your

MSYS2

安装之后,在msys的terminal中执行,可以去安装目录下寻找

 

>pacman -S mingw-w64-ucrt-x86_64-gcc

 

 Get Started with C++ and Mingw-w64 in Visual Studio Code

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

选择默认参数(直接回车即可),会执行一系列的安装

会执行一系列的安装,比如

 

 

  Install the Mingw-w64 toolchain (pacman -S --needed base-devel mingw-w64-x86_64-toolchain). Run the pacman command in a MSYS2 terminal. Accept the default to install all the members in the toolchain group.

  1. Add the path to your Mingw-w64 bin folder to the Windows PATH environment variable by using the following steps:

    1. In the Windows search bar, type 'settings' to open your Windows Settings.
    2. Search for Edit environment variables for your account.
    3. Choose the Path variable in your User variables and then select Edit.
    4. Select New and add the Mingw-w64 destination folder path to the system path. The exact path depends on which version of Mingw-w64 you have installed and where you installed it. If you used the settings above to install Mingw-w64, then add this to the path: C:\msys64\mingw64\bin.
    5. Select OK to save the updated PATH. You will need to reopen any console windows for the new PATH location to be available.
    6.  

Check your MinGW installation

To check that your Mingw-w64 tools are correctly installed and available, open a new Command Prompt and type:

gcc --version
g++ --version
gdb --version

重启后,在cmd的terminal中

 

在powershell中

 but in mysys2 terminal

 

 



 

标签:gcc,good,version,--,windows11,w64,Mingw,path,your
From: https://www.cnblogs.com/dogingate/p/17509371.html

相关文章

  • 在Windows11平台安装JDK11(双11)
    前言本文主要是详细讲解在Windows11系统上安装JDK11,安装时有一些注意事项需要说明。与JDK8的安装过程有少许不一样。一、安装前说明1.系统要求在微软Windows11平台上安装JDK11,首先我们看一下在64位Windows平台上安装JDK的系统要求,如下图:这里的信息很少,可......
  • arm-gcc 命名规则
    https://www.cnblogs.com/schips/p/12408334.html 背景在Ubuntu中交叉编译裸机程序的时候,注意到了这个问题;因此对此作为一个总结。命名规则交叉编译工具链的命名规则为:arch[-vendor][-os][-(gnu)eabi]arch-体系架构,如ARM,MIPSverdor-工具链提供商os-目标操作系......
  • Codeforces 1835F - Good Graph
    goodproblem,badround。判断YES还是NO很trivial,就直接跑最大匹配看看是不是\(n\)即可。如果是NO,那么考虑Hall定理的证明过程构造即可。具体方法就是找到左部任意一非匹配点,在残量网络上BFS可以到达的点,那所有可以到达的左部点形成的集合就是符合要求的反例。因为你......
  • go1.6.2 linux/amd64 的一个bug: gcc: 无法识别的选项‘-no-pie’
    如果你的linux是中文版的。即:执行#echo$LANG命令,返回的是zh_CN.UTF-8则会出现这个bug,如果是en_US.UTF-8则没有这个问题。 这个bug的一个例子:#goget-ugithub.com/mattn/go-sqlite3#github.com/mattn/go-sqlite3gcc:无法识别的选项‘-no-pie’虽然会报这......
  • C 语言 GCC 内嵌函数实现 Lambda 表达式
    代码({//函数实现函数名称;})#include<stdio.h>#include<malloc.h>#defineaction_lambda(function_body)\({voidlambda_funcfunction_bodylambda_func;})#definefunc_lambda(return_type,function_body)\({return_typelambda_funcfunction_b......
  • windows11安装linux
    安装教程https://blog.csdn.net/Daisy74RJ/article/details/125483629可能遇到的问题如果报错则参考WslRegisterDistributionfailedwitherror:0x800701bchttps://blog.csdn.net/xqligong/article/details/123889889Win11与自带子系统Ubuntu互传文件win11中安装了子......
  • VC和GCC静态变量析构顺序不同
    VC和GCC静态变量析构顺序不同(金庆的专栏)静态变量析构顺序正常情况下是构造的反序。但是VC对DLL中的静态变量好像是需等待DLL卸载时再析构,表现为主程序中的静态变量先析构,DLL中的静态变量后析构。VC测试版本为VC2010Express.例如:classA{};sta......
  • MegEngine 使用小技巧:如何做 MegCC 的模型性能评测
    MegCC 是一个深度学习模型编译器,具有以下特点:极轻量级运行时:只在二进制文件中保留所需的计算内核。例如,MobileNetv1的81KB运行时间高性能:每个操作都经过专家精心优化便携:只生成计算代码,易于在Linux、Android、TEE、BareMetal上编译和使用LowMemoryUsagewhileBootIn......
  • GCC/G++选项 -Wl,-Bstatic和-Wl,-Bdynamic
    GCC/G++选项-Wl,-Bstatic和-Wl,-Bdynamic参考https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html gcc使用-Wl传递连接器参数,ld使用-Bdynamic强制连接动态库,-Bstatic强制连接静态库。所以部分静态,部分动态连接这么写:gcc...-Wl,-Bstatic-l<your-static-lib>-Wl,-Bdyn......
  • 交叉编译之为RISC v平台编译x86的gcc
    读者应该比较了解交叉编译的概念,一般都是在x86平台下使用gcc编译出其它平台的代码,这里我尝试在RISCv平台下编译出可以在x86平台使用的代码。环境在x86_64平台上编译riscv64-unknown-linux-gnu-gcc编译器,网上教程很多不再赘述在x86_64平台上使用riscv64-unknown-linux-......