gpt4 book ai didi

perl - 编译的 perl 可执行文件无法在 Windows 7(64 位)上运行

转载 作者:行者123 更新时间:2023-12-01 15:21:15 25 4
gpt4 key购买 nike

我已经在 64 位 linux 内核上创建了一个 perl 脚本的可执行文件 (.exe)。它在此环境中正确执行。

当可执行文件在 64 位 Windows 7 中运行时,会显示以下错误消息:

The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

鉴于源操作系统和目标操作系统都是 64 位的,我不确定构建的架构是否是问题所在。要使已编译的 perl 程序在 Windows 中正确执行,是否有任何特殊注意事项?谢谢。

最佳答案

可执行文件不跨平台兼容。它们将仅在原始平台上运行,除非它们明确地交叉编译到不同的目标。这实际上就是我们使用解释语言的原因。你想做的事是不可能的,因为 Windows 和 Linux 的 API、库,以及几乎所有的东西都是完全不同的。

这就是为什么您需要为 linux/windows/mac 下载不同版本的程序。

关于perl - 编译的 perl 可执行文件无法在 Windows 7(64 位)上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8783368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com