<div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div>I want to use cabal to build and install shared library, which will be called from C. I've already found necessary combination of flags and options to successfully build it, but now I have two main issues:<br>

</div><br>1) The library is installed into "bin".<br></div>2) The generated "stub" C headers are not installed at all.<br></div><br></div>How can I resolve this? My current options is as follows:<br><br>

<span style="font-family:courier new,monospace">executable libtest.so<br>  hs-source-dirs:      src<br>  main-is:             Test.hs<br>  default-language:    Haskell2010<br>  default-extensions:  ForeignFunctionInterface<br>

  build-depends:       base >= 4.7<br>  c-sources:           cbits/library_init.c<br>  ghc-options:         -no-hs-main -shared -dynamic<br>  cc-options:          -DMODULE=Test -fPIC</span><br><br></div>Thanks for any help and have a nice day,<br>

Nikolay.<br></div>