Open colin-adams opened 8 years ago
A workaround seems to be to add the -I flag back in: e.g:
opts = "--interface '--cg-opt -I /home/colin/dev/.cabal-sandbox/share/x86_64-linux-ghc-7.8.4/idris-0.11.1/libwebsockets'"
Actually, this just turns off generation of the exports header file. So the real workaround is to try first --interface, and then try again without :-(
That's not a sufficient workaround, as I also need to specify -o filename to get an object file without a main. So this is a serious problem.
So a workaround is to abandon the package system completely, and code everything in the makefile. This ivolves add the -I flag to point to the installed header file :-(
I am trying to generates an exports C header file so as to get external symbols into a shared object (.so file). To do this, it seems necessary to add:
to the .ipkg file.
But with this change, the C compiler complains:
The lws.h file is part of one of the installed packages specified in the
pgks =
clause of the .ipkg file. It is invoked by:from various modules in that package, which are imported by the package I am trying to compile.
So it would seem that --interface is partially turning off the effects of the
pkgs =
clause. That is, the packages are still searched for Idris imports, but not for C includes.