[Haskell-cafe] Newbie question: ghc search path for .c files
Seth J. Fogarty
sfogarty at gmail.com
Fri Mar 16 14:53:49 EDT 2007
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.
More information about the Haskell-Cafe
mailing list