如何编译mingw-w64-crt [英] How to Compile mingw-w64-crt

查看:188
本文介绍了如何编译mingw-w64-crt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10上并使用最新版本的MSYS2(已安装gcc: pacman -S gcc

I'm on Windows 10 and using the latest version of MSYS2 (with gcc installed: pacman -S gcc)

我正在尝试从编译 mingw-w64-headers mingw-w64-crt ://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/ rel = nofollow noreferrer> mingw-w64-v7.0.0

I'm trying to compile mingw-w64-headers and mingw-w64-crt from mingw-w64-v7.0.0

在我的MSYS2安装目录 C:\msys2 内,我已经创建了文件夹 mingw-w64

Inside of my MSYS2 installation directory C:\msys2 I have created the folder mingw-w64 which I reference in the prefix argument below.

要编译这些文件,请使用相同的步骤(在适当的地方替换库的名称):

To compile each of these I use the same steps (replace name of library where appropriate):

mkdir mingw-w64-crt && cd mingw-w64-crt
../mingw-w64-v7.0.0/mingw-w64-crt/configure --prefix=/mingw-w64
make
make install

这适用于 mingw-w64-headers ,但适用于 mingw-w64-crt 我在 make 步骤遇到错误。具体来说:从类型为 int的类型分配为类型 mbstate_t (又名 结构匿名} )时的不兼容类型。可以在此处找到更详细的错误图片。

This works for mingw-w64-headers however for mingw-w64-crt I encounter errors at the make step. Specifically: incompatible types when assigning to type 'mbstate_t' {aka 'struct anonymous'} from type 'int'. A more detailed error image can be found here.

我将不胜感激

推荐答案

执行以下操作使我能够成功编译:

Performing the following has allowed me to successfully compile:

pacman -S $MINGW_PACKAGE_PREFIX-toolchain
mkdir mingw-w64-crt && cd mingw-w64-crt
../mingw-w64-v7.0.0/mingw-w64-crt/configure --prefix=/mingw-w64 --with-sysroot=/mingw64
make -j %NUMBER_OF_PROCESSORS%
make install

这篇关于如何编译mingw-w64-crt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆