Noob attempt

Posts 1–10 of 10 · Page 1 of 1
Noob attempt
I am just learning C++ and all of the codes i try out of the book are giving me

"LINK : error LNK2001: unresolved external symbol _mainCRTStartup"

any ideas on how to fix this? Book doesn't have solutions and cant find one with google.

Fixed i guess

just seems to work when i use a precompiled header instead of an empty project and add

#include "stdafx.h"

to the beginning

still open to suggestions though

EDIT: Downloaded Visual C++ 2008 Express and all the of the problems went away.
Did you start your entry point like this?

Code:
int main()
{

}
If so i think you made a Win32 GUI application. You must choose Win32 Console Application if you want to start it like that.
Quote Originally Posted by 258456 View Post
Did you start your entry point like this?

Code:
int main()
{

}
If so i think you made a Win32 GUI application. You must choose Win32 Console Application if you want to start it like that.
yes i did the code was something along the lines of this. It was opened in a Win32 Console Application.

Code:
#include <iostream>
int main()
{
	using namespace std;
	cout << "Come up and C++ me some time.";
	cout << endl;
	cout << "You won't regret it!" << endl;
	cin.get();
	return 0;
}
If you're using Visual C++, then use MFC Application Wizard.
Quote Originally Posted by BodyByVTAK View Post
If you're using Visual C++, then use MFC Application Wizard.
That is not a correct solution at all. It actually has nothing to do with it.


@OP make another project and make it a Win32 Console application and retry then tell us because it should work, i don't see why not.
Quote Originally Posted by 258456 View Post
@OP make another project and make it a Win32 Console application and retry then tell us because it should work, i don't see why not.
does not work unless i use a precompiled header empty projects just give me errors? when i do an empty project do i have to make header file? If so how cause the book does not explain that.

grr and now that im in to functions i get a error C3867
What compiler ar you using?
Quote Originally Posted by kibbles18 View Post
What compiler ar you using?
now Visual C++ 2008 express

before VS 2010 ultimate
You should get msvc++. I don't know what you are using, but Microsoft Visual c++ 2008 or 2010 are really good ones and they wont give you errors. Keep us posted on your situation if it is solved or not.
Quote Originally Posted by 258456 View Post
You should get msvc++. I don't know what you are using, but Microsoft Visual c++ 2008 or 2010 are really good ones and they wont give you errors. Keep us posted on your situation if it is solved or not.
read above i am using msvc 2008 and msvc 2010 was giving me all the issues
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us