error LNK2019:

Why am I getting this error?

Page 1 of 1

2 Replies - 675 Views - Last Post: 27 August 2009 - 04:18 AM Rate Topic: -----

#1 Pipey85  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 30-June 09

error LNK2019:

Posted 27 August 2009 - 04:08 AM

ok, simple bit of code......

#include <iostream>
using namespace std;

int main()
{
	char key[] = "test";

	cout << key[1];



	char f;
	cin >> f;

	return 0;

}



but it wont compile throwing these errors....

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

1>C:\Users\Beautiful\Documents\Visual Studio 2008\Projects\Play\Debug\Play.exe : fatal error LNK1120: 1 unresolved externals

Im quite new to C++ and i've never encounterd an error like this? any help is greatly appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: error LNK2019:

#2 Ancient Dragon  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 81
  • View blog
  • Posts: 679
  • Joined: 19-July 09

Re: error LNK2019:

Posted 27 August 2009 - 04:15 AM

You created a Windows project instead of a Console project. Create a new project again, this time select "Win32 Console Application"

This post has been edited by Ancient Dragon: 27 August 2009 - 04:16 AM

Was This Post Helpful? 1
  • +
  • -

#3 Pipey85  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 30-June 09

Re: error LNK2019:

Posted 27 August 2009 - 04:18 AM

View PostAncient Dragon, on 27 Aug, 2009 - 03:15 AM, said:

You created a Windows project instead of a Console project. Create a new project again, this time select "Win32 Console Application"


Thankyou... how I managed to do tha i never know... oh well back to making my simple cipher.... thanks dude... you earned one!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1