微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Haskell 链接器无法打开输出文件

如何解决Haskell 链接器无法打开输出文件

我是 Haskell 的新手,我在一个小项目中使用 cabal。该项目是在 github 上管理的,如果我在当前代码上运行 cabal run,它可以正常工作。如果我输入 ghci *.hs 也没有错误但是,如果我对代码进行任何更改,以下内容将打印到终端。这里可能有什么问题?

C:\Users\65963\scripting-hs> cabal run       
Resolving dependencies...
Build profile: -w ghc-8.10.3 -O1
In order,the following will be built (use -v for more details):
 - scripting-hs-0.1.0.0 (exe:scripting-hs) (configuration changed)
Configuring executable 'scripting-hs' for scripting-hs-0.1.0.0..
Preprocessing executable 'scripting-hs' for scripting-hs-0.1.0.0..
Building executable 'scripting-hs' for scripting-hs-0.1.0.0..
Linking C:\Users\65963\scripting-hs\dist-newstyle\build\x86_64-windows\ghc-8.10.3\scripting-hs-0.1.0.0\x\scripting-hs\build\scripting-hs\scripting-hs.exe ...
C://ProgramData//chocolatey//lib//ghc//tools//ghc-8.10.3//mingw//bin/ld.exe: cannot open output file C:\Users\65963\CS Projects\St Andrews CS\CS2006\CS2006-Haskell2\scripting-hs\dist-newstyle\build\x86_64-windows\ghc-8.10.3\scripting-hs-0.1.0.0\x\scripting-hs\build\scripting-hs\scripting-hs.exe: Invalid argument
collect2.exe: error: ld returned 1 exit status
`gcc.exe' Failed in phase `Linker'. (Exit code: 1)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。