sorry, I don't know anything about mfc I've only tried the win32 api. However based on the error message it seems that you're having a linking error, the compiler is looking for the nafxcwd.lib and you probably haven't included it in your project or something.
If you are using the IDE you want to open a new project, empty win 32 console application, unless you are going to open a window and use the Win32 API.