{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif2x24kebvpjxqbf5k6wimrv6ihqfctcoafbukno6pgjvcszm2kn4",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mgmwh27mmfz2"
},
"path": "/t/compilation-error-using-microhs-main-c-eval-c/13777#post_1",
"publishedAt": "2026-03-09T11:53:57.000Z",
"site": "https://discourse.haskell.org",
"textContent": "I’ve dipped my toes into MicroHs and I’m running into a compilation error when I try to invoke it from an external directory. The Haskell code is simply the default hello world from a `cabal init`\n\n\n ( ../MicroHs/bin/mhs\n -i../MicroHs/lib\n -I../MicroHs/src/runtime\n -I../MicroHs/src/runtime/unix\n -I../MicroHs/src\n app/Main.hs -o out )\n cc1: fatal error: ./src/runtime/main.c: No such file or directory\n compilation terminated.\n cc1: fatal error: ./src/runtime/eval.c: No such file or directory\n compilation terminated.\n\n /home/deepak/code/haskell/mhsb/../MicroHs/bin/mhs: uncaught exception: error: command failed: cc -I./src/runtime -I./src/runtime/unix -D__MHS__ '-I../MicroHs/src/runtime' '-I../MicroHs/src/runtime/unix' '-I../MicroHs/src' ./src/runtime/main.c ./src/runtime/eval.c /tmp/mhsc6idpMa.c -oout\n\n\nIt seems that mhs is still trying to find main.c and eval.c in the current directory, and ` -I../MicroHs/src` does not seem to be the right flag to pass to resolve those files elsewhere. I can get it to work by symlinking or running from the MicroHs directory, but my hope was to get it working with guix",
"title": "Compilation error using MicroHS (main.c eval.c)"
}