Hi all, I found a solution to my linking problem, but it's a bit scary and I'm wondering if there is a simpler way to do this:
The solution comes from the following article: http://www.emmestech.com/moron_guides/moron1.html To get ghc to link my dll properly I had to do the following: 1. Create a .def file from the sapnwrfc.lib using pexports.exe: 'pexports sapnwrfc.lib > sapnwrfc.def' 2. Edit the sapnwrfc.def file to add @24 at the end of the function I must call. ... RfcSubmitTransaction RfcTraceTest [EMAIL PROTECTED] <-- here ... 3. Create a 'sapnwrfc.a' import library using dlltool: 'dlltool --input-def sapnwrfc.def --dllname sapnwrfc.dll --output-lib libsapnwrfc.a -k' Is there a simpler way to do this? Some way of tricking ghc to search for RfcUTF8ToSAPUC instead of [EMAIL PROTECTED] It looks like ghc/ld/gcc (whoever is responsible) adds a @24 (number depends of args) at the end of the function name when the function is called using stdcall convention. Thanks, Olivier.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe