当前位置:网站首页>Win10 搭建MSYS2环境
Win10 搭建MSYS2环境
2022-07-29 05:18:00 【cloud_yq】
msys是Windows下模拟linux运行的最新系统, 可以通过类似于linux bash的命令行窗口进行代码编译。
1、安装包地址
前往官网下载MSYS2安装包 MSYS2 (假设安装至 D:\msys64)

安装完成后,在 D:\msys64目录下会创建类似linux下的目录结构(类似挂载)
2、基本使用
1)修改msys2_shell.cmd文件 (为了使用visual studio的c编译器)
将 rem set MSYS2_PATH_TYPE=inherit
改成 set MSYS2_PATH_TYPE=inherit
2) 启动mingw64指令
打开x64 Native Tools Command Prompt for VS 2019
输入 msys2_shell.cmd -mingw64

此时,执行指令可能会报错(msys2_shell.cmd 不是内部、外部指令),由于 D:\msys64(每个人不同) 没有加入到环境变量。
添加环境变量方法: 我的电脑 右键-》属性-》高级系统设置-》环境变量-》系统变量-》path添加想加的路径。
3、使用msys2的报错记录
1)、直接打开mingw64 执行./configure 会报错:
configure: error: no acceptable C compiler found in $PATH
找不到c编译器,在本文中设置的继承visual studio的编译器,所以采用2-2)中步骤可解决这个问题。
2)、在使用2-2)步骤执行./configure指令报错:
configure: error: no acceptable ld found in $PATH
使用 pacman -S mingw-w64-x86_64-toolchain 指令添加相应编译工具。
4、参考
FFmpeg:编译(Windows)_满嘴跑火车的小土匪的博客-CSDN博客_ffmpeg windows编译
WINDOWS编译FFMPEG4.3 搭建VS2019开发环境 - 前端 - 工具 (liboliu.com)
windows10编译ffmpeg带ffplay_ScottAci的博客-CSDN博客_ffplay windows 编译
边栏推荐
猜你喜欢
随机推荐
uniapp之常用提示弹框
paddle.fluild常量计算报错‘NoneType‘ object has no attribute ‘get_fetch_list‘
Clickhouse learning (XI) clickhouseapi operation
ClickHouse学习(九)clickhouse整合mysql
使用微信小程序扫码登录系统PC端web的功能
ClickHouse学习(十一)clickhouseAPI操作
[typescript] type reduction (including type protection) and type predicate in typescript
Summary of knowledge points related to forms and forms
Detailed explanation of typical application code of C language array - master enters by mistake (step-by-step code explanation)
Hcia-r & s self use notes (26) PPP
The function of using wechat applet to scan code to log in to the PC web of the system
B - 识别浮点常量问题
Merge the same items in the same column in table
用threejs 技术做游戏跑酷
【JS题解】牛客网JS篇1-10题
ClickHouse学习(六)语法优化
Summary of the first week
【TypeScript】深入学习TypeScript对象类型
rem与px与em异同点
小程序中的DOM对象元素块动态排序
![[C language series] - detailed explanation of file operation (Part 1)](/img/12/2d47fde0385d3f1dcb31f5efa82f7b.png)








