Gaudi Framework, version v23r4

Home   Generated: Mon Sep 17 2012
Namespaces | Functions

genwindef.cpp File Reference

#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "LibSymbolInfo.h"
Include dependency graph for genwindef.cpp:

Go to the source code of this file.

Namespaces

namespace  windef

Functions

void windef::usage ()
int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file genwindef.cpp.

{
  string outfile("exports.def");
  string library("UnknownLib");
  string objfiles;
  bool debug(false);

  int arg;
  if (argc < 3) windef::usage();
  arg = 1;
  while (argv[arg][0] == '-') {
    if (strcmp(argv[arg], "--") == 0) {
      windef::usage();
    } 
    else if (strcmp(argv[arg], "-l") == 0) {
      arg++; 
      if (arg == argc) windef::usage();
      library = argv[arg];
    } 
    else if (strcmp(argv[arg], "-o") == 0) {
      arg++; 
      if (arg == argc) windef::usage();
      outfile = argv[arg];
    } 
    arg++;
  }
  if (arg == argc) windef::usage();
  for (arg; arg < argc; arg++) {
     objfiles += argv[arg];
     if( arg+1 < argc) objfiles += " ";
  }

  CLibSymbolInfo libsymbols;
  ofstream out(outfile.c_str());
  if(out.fail()) {
    cerr << "windef: Error opening file " << outfile << endl;
    return 1;
  }
  out << "LIBRARY " << library << endl;
  out << "EXPORTS" << endl;

  libsymbols.DumpSymbols(const_cast<char*>(objfiles.c_str()), out);

  out.close();


  return 0;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Mon Sep 17 2012 13:49:41 for Gaudi Framework, version v23r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004