--- 00_ptr_cast.t_orig Sat May 9 09:51:39 2009 +++ 00_ptr_cast.t Sat May 9 10:31:59 2009 @@ -17,8 +17,12 @@ my $err = gensym(); my @extraargs; -push(@extraargs, '/nologo') if $^O eq 'MSWin32' && $Config{cc} eq 'cl'; -my $cmd = "$Config{cc} -o $output $input " . join(' ', @extraargs); +my $cmd; +if($^O eq 'MSWin32' && $Config{cc} eq 'cl') { + push(@extraargs, '/nologo ' . $Config{libs}); + $cmd = "$Config{cc} /Fe$output $input " . join(' ', @extraargs); +} +else {$cmd = "$Config{cc} -o $output $input " . join(' ', @extraargs)} diag( "compiling test program with: $cmd" ); my $pid = open3(undef, $out, $err, $cmd); waitpid $pid, 0;