0

--------------------Configuration: dark blade - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/dark blade.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

dark blade.exe - 2 error(s), 0 warning(s)


that is what I get when building my project
the files are below

Attachments
#include "library.h"
bool Battle()
{
	return false;
}
#include "library.h"
bool glcomplete = false;
bool fcomplete = false;
bool scomplete = false;
bool gcomplete = false;
bool ccomplete = false;

bool Crossroads()
{
	int choice = 0;


while (choice != 10)
{
	cout << "You Stand At The Center Of Several Roads Going Off In Many Dirrections.\n";
	cout << "There Is A Small Town Behind You Full Of Shops And People.\n\n";
	

	cout << "Which Path Do You Choose?\n";
	cout << "1: Town\n";
	cout << "2: Summoning Portal\n";

	if (!glcomplete)
		cout << "3: Grasslands Road (Quest)\n";

	if (glcomplete && !fcomplete)
		cout << "4: Forest Road (Quest)\n";

	if (fcomplete && !scomplete)
		cout << "5: Swamp Road (Quest)\n";

	if (scomplete && !gcomplete)
		cout << "6: Graveyard Road (Quest)\n";

	if (gcomplete && !ccomplete)
		cout << "7: Castle Road (Quest)\n";
	
	cout << "10: Exit Game\n";

	cout << ">";

	cin >> choice;

	
	switch (choice)
	{
	case 1:
		{
			Town();
			break;
		}
	case 2:
		{
		//summoportal();
			break;
		}
	case 3:
	{
	//Grasslands();
		break;
	}
	case 4:
		{
		//if (glcomplete && !fcomplete)
			//Forest();
			break;
		}
	case 5:
		{
		//if (fcomplete && !scomplete)
			//Swamp();
			break;
		}
	case 6:
		{
		//if (scomplete && !gcomplete)
			//Graveyard();
			break;
		}
	case 7:
		{
		//if (gcomplete && !ccomplete)
			//Castle();
			break;
		}

	}

	
}
	return true;
}
#ifndef GLOBAL_DEFINE
#define GLOBAL_DEFINE


void Wait();
bool Crossroads();
bool Town();
#endif
#include "library.h"


void Wait()
{
	cout << "Press Enter to continue\n";

	cin.ignore(1);

}
#include <iostream>
using namespace std;
#include "Global.h"
#include "library.h"
using namespace std;
void main()
{

	cout << "\n\nWelcome to Dark Blade!\n";
	cout << "programmed by Louis Gonzalez\n\n";

	cout << "An Evil Demon Creature Known As The Wraith Lord Has Taken Control Of The\nWorld. He Controls A Vast Army Of Evil Creatures Who Kill People For Fun. You Must Rise\nAgainst The Wraith Lord And Kill All His Minions.\n\n";
	
	Wait();

	Crossroads();

	cout << "\n\nThank You For Playing Dark Blade! Please Play Again Soon.\n\n";
}
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Narue
0

That's a classic error. It means you created a Win32 application project but wrote code for a console mode application. The former requires WinMain instead of main as the entery point.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.