4 #pragma warning ( disable : 4273 )
22 cerr <<
"Usage: genwindef [-l <dllname>] [-o <output-file> | exports.def] <obj or lib filenames>" << endl;
31 string outfile(
"exports.def");
32 string library(
"UnknownLib");
39 while (argv[arg][0] ==
'-') {
40 if (strcmp(argv[arg],
"--") == 0) {
43 else if (strcmp(argv[arg],
"-l") == 0) {
48 else if (strcmp(argv[arg],
"-o") == 0) {
56 for (arg; arg <
argc; arg++) {
57 objfiles += argv[arg];
58 if( arg+1 < argc) objfiles +=
" ";
62 ofstream out(outfile);
64 cerr <<
"windef: Error opening file " << outfile << endl;
67 out <<
"LIBRARY " << library << endl;
68 out <<
"EXPORTS" << endl;
70 libsymbols.
DumpSymbols(const_cast<char*>(objfiles.c_str()), out);
void usage(std::string argv0)
int main(int argc, char **argv)
BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream &pFile)