in reply to Re^6: [OT - MS Visual Studio] How to build a dll that Win32::API can access
in thread [OT - MS Visual Studio] How to build a dll that Win32::API can access

Have you tried reverting to 0.41? I've had nothing but trouble with later versions.

Right now, even having re-installed 5.8.6, manually searched for and expunged all reminents later builds, even simple tests that previously worked--like Re^3: Calling dll function(created in VC++) from Perl and several others--don't. I know that sounds like FUD, and I apologise if it turns out to be so, but right now I'm at a loss to explain it.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^7: [OT - MS Visual Studio] How to build a dll that Win32::API can access

Replies are listed 'Best First'.
Re^8: [OT - MS Visual Studio] How to build a dll that Win32::API can access
by syphilis (Archbishop) on May 25, 2008 at 09:01 UTC
    Have you tried reverting to 0.41?

    No - I've gone back to 0.20 (which used to work fine for me), and I've tried both 0.53 and 0.55. They're all behaving the same. If I build with __stdcall they can't find the "procedure". If I build with __declspec(dllexport) they segfault.

    It's starting to really annoy me - so I'll give up. (It just becomes yet another challenge that I've failed.) Thankfully, I personally have no need for either Win32::API or Visual Studio.

    Cheers,
    Rob
        Try __cdecl

        Segfault.

        But ... if I want to specify either __stdcall (/Gz switch) or __cdecl (/Gd switch) am I supposed to first remove the __cdeclspec(dllexport) from the prototype and definition of the function ? I would assume that __cdeclspec(dllexport) implies the __cdecl convention anyway. So if the prototype and definition contain "__cdeclspec(dllexport)", then you're implying __cdecl when you build the dll with cl /LD double.c

        Cheers,
        Rob