use ExtUtils::MakeMaker; my %options = %{ { 'TYPEMAPS' => [ 'C:\\perl510_M\\5.10.0\\lib\\ExtUtils\\typemap' ], 'NAME' => 'Foo', 'INC' => '-IC:/temp/Foo_build', 'FUNCLIST' => ['boot_Foo', 'foo'], 'VERSION' => '0.01' } }; WriteMakefile(%options); # Remove the Makefile dependency. Causes problems on a few systems. sub MY::makefile { '' } #### int __declspec(dllexport) foo(int x, int y) #### __declspec(dllexport) int foo(int x, int y)