6 Replies - 203 Views - Last Post: 07 October 2011 - 01:25 PM Rate Topic: -----

#1 KG3UNFORGN  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 48
  • Joined: 19-October 10

Unresolved External Symbol?

Posted 07 October 2011 - 12:59 PM

Hey guys it's Kaleb, i was doing some practice coding in visual C++ Express 2008 and i ran the code and i kept getting the Unresolved External Symbol, i know that the error means that the identifier that the translator can't find, or the source file cannot be found. But i created a new project in windows 32 project and after i codeding something it says it can't find file when i guess made the file. #include <iostream> the is a weasy processer to use i mean all you have to do is type it in. i mean so it's nto the library i think. idk what it is. It is a problem witht he linker i know somehow.

heres the code i used:


// This program asks the user to enter two numbers then, 
// the program will see whicih is smaller or greater.

#include <iostream>
using namespace std;

int main()
{
	double num1;
	double num2;

	//prompts the user
	cout << "Enter a program and press ENTER: ";
	cin >> num1;
	cout << "Enter a number and press ENTER: ";
	cin >> num2;

	if (num1 > num2)
	{
		cout << num1 << " is bigger than " << num2;
	}
	else
	{
		cout << num1 << " is smaller than " << num2;
	}

	return 0;
}




The output i got was this:
>------ Build started: Project: minimum_maximum, Configuration: Debug Win32 ------
1>Compiling...
1>max_min.cpp
1>Linking...
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\liblab107\Documents\Visual Studio 2008\Projects\minimum_maximum\Debug\minimum_maximum.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\liblab107\Documents\Visual Studio 2008\Projects\minimum_maximum\minimum_maximum\Debug\BuildLog.htm"
1>minimum_maximum - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


i am really confused on why it isn't buliding or compiling....

Is This A Good Question/Topic? 0
  • +

Replies To: Unresolved External Symbol?

#2 aaa111  Icon User is offline

  • D.I.C Regular

Reputation: 88
  • View blog
  • Posts: 284
  • Joined: 21-February 07

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:02 PM

Its works fine for me.If you got problem try clean the project from build menu then build again,see if that works.
Was This Post Helpful? 1
  • +
  • -

#3 KG3UNFORGN  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 48
  • Joined: 19-October 10

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:06 PM

It's still not working...it was doing this last night as well...
Was This Post Helpful? 0
  • +
  • -

#4 aaa111  Icon User is offline

  • D.I.C Regular

Reputation: 88
  • View blog
  • Posts: 284
  • Joined: 21-February 07

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:10 PM

How did you created the project.Did you choose windows application,if yes then Recreate a new one as console application.
Was This Post Helpful? 1
  • +
  • -

#5 KG3UNFORGN  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 48
  • Joined: 19-October 10

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:15 PM

Okay i'll try Console applcation

0_o it worked your the man......but i am sure how come it did not worked in windows project though but it worked in console?
Was This Post Helpful? 0
  • +
  • -

#6 aaa111  Icon User is offline

  • D.I.C Regular

Reputation: 88
  • View blog
  • Posts: 284
  • Joined: 21-February 07

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:21 PM

When you are trying to use the project as windows application the linker tried to look the entry point as WinMain which is entry point for the windows application whereas main is the entry point for console application.
Was This Post Helpful? 1
  • +
  • -

#7 KG3UNFORGN  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 48
  • Joined: 19-October 10

Re: Unresolved External Symbol?

Posted 07 October 2011 - 01:25 PM

ohhh okay......well i learn something new everyday...thanks man you solved like at least 5 people problems lol.. and i learned somthing, very cool
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1