Thanks Mark!<br>It works also here, and even without the &quot;-fpic&quot; flag. Was it necessary for you?<br><br><div class="gmail_quote">2012/3/8 Mark Wright <span dir="ltr">&lt;<a href="mailto:markwright@internode.on.net">markwright@internode.on.net</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yves,<br>
<br>
It works (on Gentoo) when I compile it as a shared library.<br>
<br>
% g++ -o libstuff.so -fpic -shared Stuff.cpp<br>
% ghci Main.hs -L$PWD -lstuff<br>
GHCi, version 7.4.1: <a href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a>  :? for help<br>
Loading package ghc-prim ... linking ... done.<br>
Loading package integer-gmp ... linking ... done.<br>
Loading package base ... linking ... done.<br>
Loading object (dynamic) /h/argus/2/eng/haskell/cxx_stuff/libstuff.so ... done<br>
final link ... done<br>
Loading package filepath-1.3.0.0 ... linking ... done.<br>
Loading package bytestring-0.9.2.1 ... linking ... done.<br>
Loading package unix-2.5.1.0 ... linking ... done.<br>
Loading package old-locale-1.0.0.4 ... linking ... done.<br>
Loading package old-time-1.1.0.0 ... linking ... done.<br>
Loading package directory-1.1.0.2 ... linking ... done.<br>
Loading package process-1.1.0.1 ... linking ... done.<br>
Loading package goa-3.1 ... linking ... done.<br>
[1 of 1] Compiling Main             ( Main.hs, interpreted )<br>
Ok, modules loaded: Main.<br>
*Main GOA&gt;<br>
<br>
Hope this helps.<br>
<br>
Regards, Mark<br>
</blockquote></div><br>