有没有人有有效的 GMP + MINGW 安装?

发布于 2024-12-02 02:44:39 字数 358 浏览 5 评论 0原文

我花了很多天尝试在我的 MINGW Windows 安装上安装 GMP 库。我完成了这两个安装过程数十次,遵循互联网上的任何单一指南,但我无法让事情正常运行。所以,我在这里迫切地请求有人帮助我暴力破解这个问题:有没有人有一个可运行的 mingw(32 位)安装,并且已成功构建 GMP 并正在处理它?有人可以将其压缩并以某种方式发送给我吗?喜欢将其上传到 mediafire/megaupload 并分享链接吗?我知道这不太优雅,但我真的很绝望。 我只需要在 MINGW 上安装一个有效的 GMP,可能编译 c++ 源代码,这样我就可以直接使用运算符重载,但 C 版本也可以。

请有人帮忙,因为这个该死的图书馆我无法完成我的工作

再次感谢你

Matteo

I've spent days and days trying to install GMP library on my MINGW windows installation. I completed the installation process of both dozens of times, followed any single guide on the internet but I couldn't manage to get things working. So, I'm here desperate to ask someone to help me brute-force this problem: does anyone have a WORKING mingw (32 bit) installation with GMP succesfully built and working on it? Could someone zip it and send it to me somehow? Like uploading it on mediafire/megaupload and sharing the link? I know this is not very elegant, but I'm really desperate.
I'd just need a working installation of GMP on MINGW, possibly compiling c++ sources so that I can use directly operator overloading, but C version would be ok as well.

Please someone help, I can't complete my work just because of this bloody library

Thank you again

Matteo

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

子栖 2024-12-09 02:44:39

要在 mingw32 上安装 GMP(需要重新安装 mingw 进行更新,因为 mingw-get 无法更新):

删除(移动到另一个目录;存档或进行其他备份)您的 mingw32 安装。

从站点重新安装 mingw32(它将更新)。

从 msys 执行命令:

 mingw-get install mingw32-gmp 
 mingw-get install mingw32-gmp-dev

享受。

PS:如果不起作用;找到

 mingw-get install mingw32-gmp-dev 
 mingw-get install mingw32-libgmp

带有 *.lzma 扩展名的下载文件(它们将位于 mingw 子目录和 IE 浏览器的临时 Internet 文件中)

手动将它们解压到主 mingw 目录。

To install GMP on mingw32 (with mingw reinstallation for updating, because mingw-get can't update):

Delete (move to another dir; archive or do other backup) your mingw32 installation.

Reinstall mingw32 from site (it will be newer).

Do a commands from msys:

 mingw-get install mingw32-gmp 
 mingw-get install mingw32-gmp-dev

Enjoy.

PS: if it doesn't works; do

 mingw-get install mingw32-gmp-dev 
 mingw-get install mingw32-libgmp

Find the downloaded files with *.lzma extension (they will be both in mingw subdirs and in Temporary Internet Files of IE browser)

Unpack them manually to main mingw dir.

唔猫 2024-12-09 02:44:39

C++ 包装器在这里完美地工作。我有以下文件,我相信我从 MinGW 站点下载了它们,但我不完全确定:

gmp-5.0.1-1-mingw32-dev.tar
libgmp-5.0.1-1-mingw32-dll-10.tar
libgmpxx-5.0.1-1-mingw32-dll-4.tar

您需要将标头、库和 dll 复制到各自的目录,并添加 -lgmp -lgmpxx 编译器的参数。

The C++ wrapper works perfectly here. I have the following files, I believe I downloaded them from the MinGW site, but I am not completely sure:

gmp-5.0.1-1-mingw32-dev.tar
libgmp-5.0.1-1-mingw32-dll-10.tar
libgmpxx-5.0.1-1-mingw32-dll-4.tar

You need to copy the headers, libraries and dlls to their respective directories, and add the -lgmp -lgmpxx parameters to the compiler.

残疾 2024-12-09 02:44:39

有人有有效的 GMP + MINGW 安装吗? [...] 有人可以将其压缩并以某种方式发送给我吗?

刚刚遇到这个问题,尽管它可以追溯到 9 年前,但以下链接可能会有所帮助。

几周前,我为 mingw32 构建了 GMP,这样我就可以在我的 Win2000 笔记本电脑上使用它。

存档名为 gmp_2020-*_mingw32*.zip

https://sourceforge.net/projects/mobilechessboar /files/avr-gcc%20snapshots%20%28Win32%29/

只需解压并移动到您喜欢的位置。它在 x86_64 上交叉编译,这是我为旧笔记本电脑编译软件的方式。

除了 GMP 之外,该 zip 还包含 MPFRMPCGSLGMP-ECM

由于 ms / mingw 冲突,我在打印函数的未定义引用方面遇到了一些麻烦。歧义。最近的构建尝试使用 C99 兼容 (mingw) 版本。如果您遇到类似的问题,或者如果您更喜欢 ms 版本,以下技巧可能会帮助您:

https://stackoverflow.com /a/60380005/1556746

由于 GMP-ECM 始终启用 SSE2,无论配置哪个主机,因此有一个 nosse2 版本为了取悦旧的硬件。

Does anyone have a working GMP + MINGW installation? [...] Could someone zip it and send it to me somehow?

Just came across this question, and even though it dates back to 9 years ago, the following links might help.

Some weeks ago I built GMP for mingw32 so I can use it on my Win2000 laptop.

The archives are named gmp_2020-*_mingw32*.zip.

https://sourceforge.net/projects/mobilechessboar/files/avr-gcc%20snapshots%20%28Win32%29/

Just unzip and move to a location at your preference. It's cross-compiled on x86_64 which is the way I compile software for my old laptop.

Apart from GMP, the zip also contains MPFR, MPC, GSL and GMP-ECM.

I had some trouble with undefined references to print functions due to ms / mingw clash resp. ambiguity. The recent build tries to use the C99 compliant (mingw) versions. In case you encounter similar problems, or in case you prefer the ms versions, the following hack might help you:

https://stackoverflow.com/a/60380005/1556746

As GMP-ECM always enables SSE2 no matter for which host it is configured, there is a nosse2 build to please old[tm] hardware.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文