Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use o2dll to build a dll

using CBuilder results in a dll that doesn't export anything
but the XS boot code
  • Loading branch information...
commit f0dd2894d959352648675eb433b29863ff8abfd7 1 parent da98b52
@plicease authored
Showing with 6 additions and 4 deletions.
  1. +1 −0  dist.ini
  2. +5 −4 t/CompileTest.pm
View
1  dist.ini
@@ -26,3 +26,4 @@ filename = README.pod
[OSPrereqs / MSWin32]
Alien::MSYS = 0
+Alien::o2dll = 0
View
9 t/CompileTest.pm
@@ -20,12 +20,13 @@ sub compile {
return $lib_file;
} else {
my $name = $src_file;
- $name =~ s/-/_/g;
$name =~ s/\.c$//;
$name =~ s/^.*(\/|\\)//;
- print "# name = $name\n";
- my $lib_file = $b -> link(objects => $obj_file, module_name => $name);
- return $lib_file;
+ require Alien::o2dll;
+ Alien::o2dll::o2dll(-o => "$name.dll", $obj_file);
+ rename "$name.dll", "t/$name.dll";
+ rename "$name.dll.a", "t/$name.dll.a";
+ "t/$name.dll";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.