Can't run my program :  LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) 

I can compile my program, but can't run it. Its a windows console application, and it's set as such in Linker>System>SubSystem

    #include "stdafx.h"
    #include <iostream>
    #include <queue>
    #include "puzzle.h"
    #include "state.h"
    #include <vector>
    
    using namespace std;
    
    template <typename Puzzle, typename State>
    int main()
    {
    	Puzzle puzzle8;
    	State goalState = new State();
    	State currentState = new State();
    
    	//goal state
    	goalState.board = { { 1, 2, 3 },
    						{ 4, 5, 6 },
    						{ 7, 8, 0 } };
    	//start state
    	currentState.board = { { 8, 2, 1 },
    							{ 5, 6, 0 },
    							{ 3, 7, 4 } };
    
    	puzzle8.visited.push_back(currentState); //add to visited
    
    	while (!isGoalState(currentState, goalState))
    	{    		
    		int f, best;
    		int board1Cost, board2Cost, board3Cost, board4Cost;
    		vector<State> newStates = expand(currentState);
    		int bestState = getLowestCost(newStates);
    
    		currentState = newStates.at(bestState).board;
    		cout << "New State found:" << endl;
    		printState(currentState);
    		puzzle8.visited.push_back(currentState);
    
    	}
    	return 0;
    }