error LNK1561

error LNK1561: entry point must be defined

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#include <iostream>
#include <string>
#include "genlib.h"
#include "simpio.h"
#include "set.h"
#include "lexicon.h"
#include <fstream>

using namespace std;

int main()
{
	Lexicon* lex = NULL;

	cout << "Welcome to the Automating Activity Coding from Model and Sensor Data" << endl << endl;
	//"field measurement classification tester"
	//startup sequence
	DoMenuChoice(lex, 1); //CIFE seed, 1) create new code list
	DoMenuChoice(lex, 2); //CIFE seed, 2) load file schedule.txt, xml export from vico control containing properties
	DoMenuChoice(lex, 6); //CIFE seed, 3) display number of activity codes in code list
	DoMenuChoice(lex, 7); //CIFE seed, 4) display activity codes in code list

	string file = GetLine(); //filename
	ifstream in;
	in.open("999999.txt"); //"class" is file containing a list of recorded attributes needing classification

	while (true) {
		int choice = GetMenuChoice();
		if (choice == 0) break;
		DoMenuChoice(lex, choice);
	}

	in.close(); //boilerplate close file line
	if (lex != NULL) delete lex; //shutdown process

	return 0; //goodbye!
}


VS11BETA
I do not know much about VS configuration
Make sure you're using the console subsystem. Go to the project configuration window, and into the Linker section (I don't know the exact names for the latest VS), and select /SUBSYSTEM:CONSOLE in the Subsystem bit (again, I'm not sure what this will be called).

By default, it's probably expecting you to use WinMain.

(The entry point of a program is the 'main' function basically)
that was it, fixed
Topic archived. No new replies allowed.