6 #pragma warning ( disable : 4273 )
24 cerr <<
"Usage: genwindef [-l <dllname>] [-o <output-file> | exports.def] <obj or lib filenames>" << endl;
30 int main (
int argc,
char** argv )
33 string outfile(
"exports.def");
34 string library(
"UnknownLib");
41 while (argv[arg][0] ==
'-') {
42 if (strcmp(argv[arg],
"--") == 0) {
45 else if (strcmp(argv[arg],
"-l") == 0) {
50 else if (strcmp(argv[arg],
"-o") == 0) {
58 for (arg; arg < argc; arg++) {
59 objfiles += argv[arg];
60 if( arg+1 < argc) objfiles +=
" ";
64 ofstream out(outfile.c_str());
66 cerr <<
"windef: Error opening file " << outfile << endl;
69 out <<
"LIBRARY " << library << endl;
70 out <<
"EXPORTS" << endl;
72 libsymbols.
DumpSymbols(const_cast<char*>(objfiles.c_str()), out);