On Wed, May 14, 2008 at 5:46 PM, Bulat Ziganshin <<a href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
use stdcall instead of ccall in Haskell too. afair, depending on<br>
calling conventions, different prefixes/suffixes are used when<br>
translating C function name into assembler (dll) name<br>
<font color="#888888"></font></blockquote><div> </div></div>Oops, sorry I copied the wrong line in my e-mail. I'm using stdcall in
the foreign import. I first tried with ccall and then realized the
header was defining the stdcall convention when built on windows. The
link error occurs when I use stdcall. When I use ccall it links but
gives segmentation faults when I run the program.<br>
<br>Here is the last import I used.<br>foreign import stdcall unsafe "sapnwrfc.h RfcUTF8ToSAPUC"<div class="Ih2E3d"><br>
f_RfcUTF8ToSAPUC :: RfcBytePtr -> CUInt -> SapUCPtr -> Ptr
CUInt -> Ptr CUInt -> RfcErrorInfoPtr -> IO RfcRetCodeType<br>
<br></div>Thanks,<br><br>Olivier.<br>