Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Anidem

unresolved external errors

This topic is 6017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

These are the errors I got when compiling my application, however, I don't understand them. Can someone help? Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/Test.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Just in case someone needs the code to help figure out the errors:
#include <iostream.h> //Enables us to access cout

class Cat
{
	public:
		int  GetAge();
		void SetAge (int age);
		void Meow();
	private:
		int itsAge;
};

int Cat::GetAge()
{
	return itsAge;
}

void Cat::SetAge(int Age)
{
	itsAge = Age;
}

void Cat::Meow()
{
	cout << "Meow.\n";

}

int main()
{
	Cat Bryan;
	cout << Bryan.GetAge();
	Bryan.SetAge(7);
	Bryan.Meow();
	cout << Bryan.GetAge();
	return 0;
} 
Edited by - Anidem on February 24, 2002 12:20:42 PM

Share this post


Link to post
Share on other sites
Advertisement
u should really read the beginners forum before posting this but, since ur obviously a beginnner ill help anywhay.....(assuming your using VC++) you have created a win32 appilcation, which requires knowledge of the winapi, the error says its looking for the win32 equvilant of main() it wants WinMain, you have to build a new project and select win32 console app, then you code will work

BTW, use #include <isotream> its supposedly the "new and better" one, but i dont see a diff

,Matt

-= kill one your a murderer, kill thousands your a conquerer =-

Share this post


Link to post
Share on other sites
You probably made a win32 application instead of a console app. The linker is looking for winmain, but cant find it. Try making a console app and it should work.

Beat me to it

Edited by - Sheep on February 24, 2002 12:26:12 PM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!