creating a library from haskell files and a c wrapper in Linux
Martin Norbäck
d95mback@dtek.chalmers.se
10 Sep 2002 16:08:50 +0200
--=-B4e8rzgD5HHki72yzzgQ
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
tis 2002-09-10 klockan 15.40 skrev Martin Norb=E4ck:
> I'll try to find out the right libraries to pass to ld, but it would be
> much easier if ghc could do it by itself, as it can do under Windows.
Now I have done the following:
# ghc -fglasgow-exts -c Adder.hs
# gcc -c -DDLL_IMPORT=3D -I/usr/lib/ghc-5.04/include dllMain.c
# ld -shared -o adder.so Adder.o Adder_stub.o dllMain.o
-L/usr/lib/ghc-5.04 -lHSbase -lHSbase_cbits -lHSrts -lHSbase -lgmp
# gcc test.c -L. -ladder
# env LD_LIBRARY_PATH=3D. ./a.out
and then I get the following:
a.out: fatal error: LOOKS_LIKE_GHC_INFO- is incorrectly defined
What to do next, I wonder...
Regards,
Martin
--=20
Martin Norb=E4ck d95mback@dtek.chalmers.se =20
Kapplandsgatan 40 +46 (0)708 26 33 60 =20
S-414 78 G=D6TEBORG http://www.dtek.chalmers.se/~d95mback/
SWEDEN OpenPGP ID: 3FA8580B
--=-B4e8rzgD5HHki72yzzgQ
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: För information se http://www.gnupg.org/
iD8DBQA9ffzykXyAGj+oWAsRAqBDAKCWyWc67xqvfWsulJrdOfD+E1KeoACfeQD3
vmqDTB2aokmnzsShPoVbd0A=
=5pLn
-----END PGP SIGNATURE-----
--=-B4e8rzgD5HHki72yzzgQ--