Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Import a DLL from C# to Perl

by syphilis (Archbishop)
on May 11, 2018 at 03:33 UTC ( [id://1214362]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Import a DLL from C# to Perl
in thread Import a DLL from C# to Perl

Using DEV-C++ I can run the code with no problems, with Inline::C I get the same error

I think the DEV-C++ success demonstrates that mingw ports of gcc are capable of providing what's needed - since DEV-C++ uses such a port of gcc.

Inline::C and Inline::CPP provide a Config option (CC => 'C:/other/compiler.exe') that enables the use of a specific compiler. You could try specifying the DEV-C++ compiler as the one to use, and see how that goes.
Though, for that to work, you might also have to import more of the DEV-C++ environment into the environment under which you're running perl.
YMMV.

You could also look at building your own perl with your MSVC compiler. I think (untested by me) that's still a fairly simple procedure:
1) Download and unpack the perl source.
2) Open a 'cmd.exe' shell and set up your MSVC environment. (This used to mean running vcvars32.bat ... dunno if that's still appropriate for your case.)
3) 'cd' to the win32 folder of the perl source.
4) Configure the "Makefile" file as appropriate. (Just follow the documentation that's in the "Makefile" file.)
5) Run 'nmake' then 'nmake test' then 'nmake install'.
6) Always run perl with your MSVC environment set.

I expect that would deliver what you want - but, as we've already seen, what I expect and what you will get are not necessarily the same.

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-25 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found