Main-Is not creating executable

Alistair Bayley alistair at
Tue Jan 20 11:27:42 EST 2009

I have this in Takusen.cabal:

Executable miniunit_tests
  Main-Is: Test/MiniUnit/Main.hs
  Build-Depends:  base, mtl
  Extensions: CPP

(as well as the Library section). When it builds, the modules compile
fine, but then I get:

Warning: output was redirected with -o, but no output will be
generated because there is no Main module.

The ghc command (from setup -v build):

Building executable: miniunit_tests...
Creating dist\build\miniunit_tests (and its parents)
Creating dist\build\miniunit_tests\miniunit_tests-tmp (and its parents)
c:\ghc\ghc-6.10.1\bin\ghc.exe -o dist\build\miniunit_tests\miniunit_tests.exe --
make -hide-all-packages -no-user-package-conf -i -idist\build\miniunit_tests\min
iunit_tests-tmp -i. -idist\build\autogen -Idist\build\autogen -Idist\build\miniu
nit_tests\miniunit_tests-tmp -optP-DNEW_EXCEPTION -optP-include -optPdist\build\
autogen\cabal_macros.h -odir dist\build\miniunit_tests\miniunit_tests-tmp -hidir
 dist\build\miniunit_tests\miniunit_tests-tmp -stubdir dist\build\miniunit_tests
\miniunit_tests-tmp -package QuickCheck- -package Takusen-0.8.4 -package
base- -package mtl- -package old-time- -package time-1.1.2.
2 -O -XCPP .\Test/MiniUnit/Main.hs

I don't see ghc flag -main-is in here. What do I need to do to get it
to build the executable?

Also, is there a way to get it to just build miniunit_tests.exe i.e.
without rebuilding the library and another executable target?


More information about the Libraries mailing list