I have made the math example with both FOR_HUGS=NO and FOR_HUGS=YES on
[dom@lhrtba8fd85 mypcre]$ uname -a
Linux lhrtba8fd85 2.2.12-20 #1 Thu Nov 11 12:45:54 GMT 1999 i686 unknown
I managed to make the pcre example with FOR_HUGS=NO but when I tried make with
FOR_HUGS=YES, I got the following:
[dom@lhrtba8fd85 mypcre]$ make
../../src/ihc -fhs-to-c -fno-qualified-names -fexclude-system-includes -cpp -I/h
ome/dom/pcre-2.08/ --asf=Pcre.asf -fvoid-typedef-is-abstract -finline-synonyms -
fout-pointers-are-not-refs --hugs -c Pcre.idl -o Pcre.hs
gcc -fPIC -I../../lib -I/home/dom/pcre-2.08/ -c Pcre.c -o Pcre.dll_o
In file included from Pcre.c:22:
/home/dom/pcre-2.08/pcre.h:71: warning: parameter names (without types) in funct
ion declaration
Pcre.c: In function `prim_Pcre_pcre_maketables':
Pcre.c:130: warning: assignment discards `const' from pointer target type
Pcre.c: In function `prim_Pcre_pcre_version':
Pcre.c:150: warning: assignment discards `const' from pointer target type
gcc -fPIC -shared -o PcreStub.so Pcre.dll_o
[dom@lhrtba8fd85 mypcre]$
I assume that the makefile should have specified Pcre.so rather than PcreStub.so as
trying hugs with
:l main
gives
Reading file "Pcre.hs":
Parsing
ERROR "Pcre.hs": Error while importing DLL "/home/dom/haskelldirect/hdirect-0.16
/examples/mypcre/Pcre.so":
/home/dom/haskelldirect/hdirect-0.16/examples/mypcre/Pcre.so: cannot open shared
object file: No such file or directory
So I copied PcreStub.so to Pcre.so and tried again. This time I got
Reading file "Pcre.hs":
Parsing
ERROR "Pcre.hs": Error while importing DLL "/home/dom/haskelldirect/hdirect-0.16
/examples/mypcre/Pcre.so":
/home/dom/haskelldirect/hdirect-0.16/examples/mypcre/Pcre.so: undefined symbol:
pcre_copy_substring
Dominic.