New to C++ and Windows

I've been coding for a long time in C and C-like languages (anyone remember Deep Blue C and Action! for the Atari 8-bit machines?) and recently decided to finally upgrade my skill sets to include C++ and move into Windows programming instead of just console apps.

First of all, I'm a "hobbyist coder" and not a professional developer. I write a few console apps now and then to do tasks I need to do. The last program I actually released for others to use was when the Atari and Commodore 8-bits ruled the world.

On the PC, I have used the DevC++ system for many years, and it did what I needed, but since it's no longer supported and quite dated, I decided to move up the food chain a little.

I downloaded NetBeans 7.3.1 with the Cygwin packages, and I can get it to do console apps, but I have been unable to get it to work with the Windows SDK. I messed with it for a week or two, and no real luck.

I then went to the proverbial horse's mouth...I grabbed the Visual C++ 2005 Express. It integrated to the SDK just fine, but I still can't get sample Windows code to compile.

For example...

At http://msdn.microsoft.com/en-us/library/windows/desktop/ff381409%28v=vs.85%29.aspx there is some sample code that builds a simple window, and I did a cut and paste of that code into the Visual C++ editor. When I try to compile and run the code, I get about a dozen errors for unresolved external symbols.

I went through the (great) C++ tutorial here at http://www.cplusplus.com/doc/tutorial/ and all the sample code there worked fine for the console apps. But nothing on the MSDN site seems to work with MS's own system.

I suspect I am missing something very simple, but I have no clue what!

Thanks for any help!

Charles
closed account (N36fSL3A)
Why are you using 2005? Upgrade to 2010 or 12, at least they have SOME c++11 features.
I failed to mention that I'm running all of this on an XPPsp3 machine.

2005 was the latest I could find that ran on this OS.

I tried to install 2012, but it failed saying I needed Windows 7 (I think) or better.
closed account (N36fSL3A)
XP should be able to run VS 2010, as I'm running it on this current PC right now.
I'll track down 2010 and see if that works/fixes the issues.

Thanks!
I've got a set of VS 2010 discs sitting on my shelf right now collecting dust.. It's a fantastic IDE if you want to develop pretty heavy programs, but it's certainly not light weight.

For me, the Orwell Dev-C++ fork is a fantastic alternative, and doesn't take up nearly as much space on the HD. If you were a fan of Dev-C++ before, you might enjoy using it again with added features. It supports compiling in 32-bit and 64-bit architectures as well, which can be nice.

http://sourceforge.net/projects/orwelldevcpp/
@kc6ufm

I grabbed the Visual C++ 2005 Express.

Where did you find it?

I have some legacy code which needs MSVC2005 (as it relies on some old, third party libraries) so I could do with a copy of ISO. But I couldn't find it on Microsoft's website.

Andy
closed account (N36fSL3A)
I'd wouldn't recommend any other compiler for developing Windows apps.
I confirm SP3's good for VS10.
Also I believe on 05 you have to download the Windows SDK on his own (No link as i'm in mobile, just google).
Also, VS10 installs it for you (also VS08 does. Plus, You should absolutely uninstall VS05 as it is completely unused, unsupported and unsafe - You can also think to get W7 and go VS13 preview to get the most out of your programs, but VS10 is good enough - Been using it since a couple years).

Cygwin is the compiler suite I would not suggest, use MinGW instead (Code::Blocks/Orwell Dev-C++) or use VS08+.
You should absolutely uninstall VS05 as it is completely unused, unsupported and unsafe
Why do you say that?

IMHO, VS2005 was the first in a run of good releases. I always keep an installation around on a win32 box.
OK...I downloaded and installed the VSE 2010 release, and I was able to get the sample code in the MSDN tutorial to compile and run with only a couple of small changes.

So, thanks to all that helped out.

I don't recall where I downloaded the 2005 version from, though...I just did a Google for it, and there it was. I think it was from MS download archives.

Now, back to the learning curve!

Charles
@kbw... Huh? From what I heard on some forums (I don't remember which one, probably the MS forums tho), the produced executable was usually buggy and crashy, lacking any reason to be so.
Maybe it's the version before that one.
But I would not use it in any way, however.
Certainly VS10 has more features than VS05 had.
I'm not sure where you heard that Visual Studio 2005 produced buggy executables which crashed all the time. We were using it on our production server in my last job without issue. Well, no issues which you could blame on Visual Studio.

(We were stuck with it because we relised on 3rd pary libraries which used C++ linkage and had been built using Visual C++ 2005.)

Andy
I think you can use VS08 and VS10 with VS05-Cpp-Linked libraries?
I think their name mangling hasn't changed:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680585(v=vs.85).aspx
( http://msdn.microsoft.com/en-us/library/windows/desktop/ms681400(v=vs.85).aspx )
Topic archived. No new replies allowed.