相关疑难解决方法(0)

ghc 编译错误“输出已使用 -o 重定向,但不会生成任何输出,因为没有主模块。”

当谷歌搜索此错误时没有看到任何相关结果,所以我想将其发布。

stack build
Building all executables for `gitchapter' once. After a successful build of all of them, only specified executables will be rebuilt.
gitchapter-0.1.0.0: build (exe)
Preprocessing executable 'app' for gitchapter-0.1.0.0..
Building executable 'app' for gitchapter-0.1.0.0..
Preprocessing executable 'test' for gitchapter-0.1.0.0..
Warning: Enabling workaround for Main module 'Main' listed in 'other-modules'
Building executable 'test' for gitchapter-0.1.0.0..
illegaly!

<no location info>: error:
    output was redirected with -o, but no output will be generated
because there is no Main module.


--  While …
Run Code Online (Sandbox Code Playgroud)

haskell cabal haskell-stack

7
推荐指数
1
解决办法
980
查看次数

标签 统计

cabal ×1

haskell ×1

haskell-stack ×1