Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSLoader+delay load DLLs #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ my %param = (
);
$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03;
$param{LIBS} = ['-L/lib/w32api -lole32 -lversion'] if $^O eq "cygwin";
$param{dynamic_lib} =
{OTHERLDFLAGS => '-DELAYLOAD:ole32.dll -DELAYLOAD:version.dll delayimp.lib'}
if $Config::Config{cc} =~ /cl/;

WriteMakefile(%param);
6 changes: 3 additions & 3 deletions Win32.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package Win32;
use vars qw|$VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK|;

require Exporter;
require DynaLoader;
require XSLoader;

@ISA = qw|Exporter DynaLoader|;
@ISA = qw|Exporter|;
$VERSION = '0.52';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
Expand Down Expand Up @@ -647,7 +647,7 @@ sub _GetOSName {

# "no warnings 'redefine';" doesn't work for 5.8.7 and earlier
local $^W = 0;
bootstrap Win32;
XSLoader::load('Win32');

1;

Expand Down