Newbie question: ghc search path for .c files

Hi, I am having difficulty compiling a program that uses a foreign library. The readme says to first compile a C file: :> ghc mipFFI.c -c mipFFI.c:1:0: lpkit.h: No such file or directory Alright, that's not uncommon. gcc confirms :> gcc mipFFI.c mipFFI.c:1: lpkit.h: No such file or directory mipFFI.c:2: HsFFI.h: No such file or directory So I then include the directory and gcc finds the lpkit.h file. :> gcc -I /home/sfogarty/lib/lp_solve_5.5 mipFFI.c mipFFI.c:2: HsFFI.h: No such file or directory However ghc does not seem to accept this :> ghc -i/home/sfogarty/lib/lp_solve_5.5 mipFFI.c mipFFI.c:1:0: lpkit.h: No such file or directory I've tried every variation of spacing, capitalization, copying the files to the local directory, simply listing the files ahead. Nothing seems to work! I am horribly confused! And another question while I am here: -package posix and -package lang don't seem to be included on my distribution of ghc. I am having minimal success, as yet, finding where to download them. If I could get a pointer, I'd be very appreciative. If not, I'm sure I'll find it eventually. -- Seth Fogarty sfogarty@[gmail.com|rice.edu|livejournal] Neep-neep at large AIM: Sorrath "Let us not seek to satisfy our thirst for freedom by drinking from the cup of bitterness and hatred." - Martin Luther King, Jr.

Hi Seth, On Fri, Mar 16, 2007 at 01:53:49PM -0500, Seth J. Fogarty wrote:
:> ghc -i/home/sfogarty/lib/lp_solve_5.5 mipFFI.c mipFFI.c:1:0: lpkit.h: No such file or directory
ghc -I/home/sfogarty/lib/lp_solve_5.5 mipFFI.c should work. If not, add -v to the commandline to see what it is doing.
And another question while I am here: -package posix and -package lang don't seem to be included on my distribution of ghc.
They are gone now. Programs using them should be updated to use newer libraries instead - which ones will depend on what you were using from them. Thanks Ian
participants (2)
-
Ian Lynagh
-
Seth J. Fogarty