【问题标题】:Haskell plugins package on Windows Not x86 PEi386 errorWindows 上的 Haskell 插件包不是 x86 PEi386 错误
【发布时间】:2012-03-23 22:24:04
【问题描述】:

我正在尝试让插件包在 Windows 上运行。

我有 Windows Vista 64 位。我今天安装了最新的 Haskell 平台(ghc --version 说 7.0.4)。我安装了最新的cygwin。

我运行了一个简单的示例(特别是 this one 并在修复了各种问题后(请参阅 here)我收到此错误:

Main.exe: Plug.dll: Not x86 PEi386
Main.exe: user error (Could not load module `Plug.dll')

我不知道该去哪里。

我用同样的方法编译了dll和测试代码,smae ghc:

ghc -shared -o Plug.dll Plug.hs
ghc -package ghc -o Main Main.hs

另外,我使用 InspectExe 检查,它说 Plug.dll 文件是一个 32 位 dll,它能够成功加载它。

【问题讨论】:

    标签: windows haskell plugins


    【解决方案1】:

    GHC 不支持在 Windows 平台上编译 64 位二进制文​​件 (#1884)。 GHC 生成的所有可执行文件在 Windows 上都是 32 位的。这意味着您只能链接到 32 位 DLL。显然,您编译的 DLL 没有编译为 32 位,这可能是因为您使用了除 MinGW 之外的其他编译器来生成 DLL。

    【讨论】:

    • 谢谢,但是根据 InspectExe,它是一个 32 位的 dll。
    猜你喜欢
    • 2012-04-05
    • 1970-01-01
    • 2022-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-08
    相关资源
    最近更新 更多