So I have the following makefile which I want to use to compile my haskell program. However, in my program.hs
file I have imported a library that is not in the standard Haskell distribution (e.g. Data.List
). As a result, when I try to compile I get the error below. How can I include the said library so that it compiles fine? P.S. I am NOT interested in other approaches which do not involve a makefile, thank you.
error:
Linking program...
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
makefile:
program: program.hs
ghc --make -static -optl-static program.hs