在Windows上安装C库

发布于 2025-02-11 15:18:58 字数 195 浏览 1 评论 0 原文

我想将一些程序从Ubuntu迁移到Windows。这些代码使用GNU/GSL库,我通过配置在Ubuntu上安装了gnu/gsl库 - >制作 - >进行安装。但是,我正在努力尝试使用Mingw-W64(来自Ubuntu)对库进行交叉编译,但我甚至都不知道如何从Windows本身内部编译库(我想这是首选的解决方案,而不是交叉 - 无论如何)。

谢谢。

I want to migrate some programs from Ubuntu to Windows. These codes use the gnu/gsl library, which I installed on Ubuntu through configure -> make -> make install. However I am struggling trying to cross-compile the library using mingw-w64 (from Ubuntu), and I don't have even a clue of how to compile the library from within Windows itself (which I guess is the preferred solution rather than cross-compile anyway).

Thank you.

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

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

发布评论

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

评论(1

探春 2025-02-18 15:18:58

我了解您已经安装了CodeBlocks(推荐版本:20.03)。
至于mingw/gcc工具链,我建议通过按照 msys2 a>。
此时,您应该:

  • 在CodeBlocks中将上述编译器设置(卸载MINGW/GCC的​​先前安装后)
  • GNU/GSL库可以用以下命令安装为软件包(来自MSYS2 Shell):
    $ PACMAN -S MINGW-W64-X86_64-GSL

现在您可以设置(在您的CodeBlocks Project中)标题文件和GSL静态或动态库的路径。

I understand that you have already installed CodeBlocks (recommended version: 20.03).
As for the MinGW/GCC toolchain I recommend installing Msys2 by following the instructions on the home page.
At this point you should:

  • set the aforementioned compiler in CodeBlocks (after uninstalling previous installations of MinGW/GCC)
  • the GNU/GSL library can be installed as a package (from the Msys2 shell) with the following command:
    $ pacman -S mingw-w64-x86_64-gsl

Now you can set (in your CodeBlocks project) the paths for the headers files and for the GSL static or dynamic libraries.

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