Diana
March 29th, 1999, 09:13 PM
I get the following error when I compile a simple console application in Visual C++:
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
I've read the documentation but I can't seem to find my error - lthough I must admit I'm a beginner and don't know a
lot of the concepts mentioned. Here's my main application if anyone sees anything obvious that I might be doing wrong
please let me know.
#include "TopoSort.h" // this file includes
// <stdlib.h>,<iostream.h>,<fstream.h>
... // and others
// a bunch of functions here
...
int main (void) // main routine
{
int x=1; // used for keyboard control of while
ofstream fout; // an output file
AdjList AL; // an adjacency list
int DFmax=1;
ifstream fin; // an input file
char fileName[10]; // a file name
fout.open("out.txt"); // prepare output file
while (x)
{
cout << "Enter file name: "; // print a message
cin >> fileName;
fin.open(fileName); // open that file
if (!fin)
{
cout << "Cannot open "<< fileName << ".";
return 0;
}
GetData(AL,fout,fin); // get adjacency list data
//******variable definitions for each set of data***********
Array InvDFnum(AL.Size); // the inverse of DF numbering //(to
find vertex)
Array DFnum(AL.Size); // the DF numbering
Array LowPt(AL.Size); // the low points
Init(DFnum,InvDFnum,LowPt);
//************************************************
// DFnumbering(fout,1,AL,DFnum,DFmax);
DFmax=1;
DFS(fout,1,AL,DFnum,LowPt,DFmax,InvDFnum);
fout<<"----------------------------------------"<<endl;
cout<< "press 0 to quit:";
cin >>x;
}//end while
fout.close();
fout<<"Output written to file: out.txt"<<endl;
return 1;
} // end of main()
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
I've read the documentation but I can't seem to find my error - lthough I must admit I'm a beginner and don't know a
lot of the concepts mentioned. Here's my main application if anyone sees anything obvious that I might be doing wrong
please let me know.
#include "TopoSort.h" // this file includes
// <stdlib.h>,<iostream.h>,<fstream.h>
... // and others
// a bunch of functions here
...
int main (void) // main routine
{
int x=1; // used for keyboard control of while
ofstream fout; // an output file
AdjList AL; // an adjacency list
int DFmax=1;
ifstream fin; // an input file
char fileName[10]; // a file name
fout.open("out.txt"); // prepare output file
while (x)
{
cout << "Enter file name: "; // print a message
cin >> fileName;
fin.open(fileName); // open that file
if (!fin)
{
cout << "Cannot open "<< fileName << ".";
return 0;
}
GetData(AL,fout,fin); // get adjacency list data
//******variable definitions for each set of data***********
Array InvDFnum(AL.Size); // the inverse of DF numbering //(to
find vertex)
Array DFnum(AL.Size); // the DF numbering
Array LowPt(AL.Size); // the low points
Init(DFnum,InvDFnum,LowPt);
//************************************************
// DFnumbering(fout,1,AL,DFnum,DFmax);
DFmax=1;
DFS(fout,1,AL,DFnum,LowPt,DFmax,InvDFnum);
fout<<"----------------------------------------"<<endl;
cout<< "press 0 to quit:";
cin >>x;
}//end while
fout.close();
fout<<"Output written to file: out.txt"<<endl;
return 1;
} // end of main()