1) gendef works from inside visual studio - use a tempfile instead of
redirection, because for some reason you can't redirect dumpbin from
inside (patch from Joachim Wieland)
2) gendef must process only *.obj, or you get weird errors in some build
scenarios when it tries to process a logfile
Magnus Hagander
print "Generating $defname.DEF from directory $ARGV[0]\n";
-while (<$ARGV[0]/*>) {
+while (<$ARGV[0]/*.obj>) {
print ".";
- open(F,"dumpbin /symbols $_|") || die "Could not open $_\n";
+ system("dumpbin /symbols /out:symbols.out $_ >NUL") && die "Could not call dumpbin";
+ open(F, "<symbols.out") || die "Could not open symbols.out for $_\n";
while (<F>) {
s/\(\)//g;
next unless /^\d/;
push @def, $pieces[6];
}
close(F);
+ unlink("symbols.out");
}
print "\n";