Visual C++ 2010

Hi Guys!

I had to reformat my computer recently and I did a fresh install of Visual C++ 2010 on my Windows 10 machine. I have previously had C++ projects that use <Winsock2.h> and the projects were working fine.

Now, I cant even compile an example Winsock2.h C++ program. I must stress that I am new to C++, but I had VC++ 2010 working fine, what am I doing wrong now for it not to compile any example Winsock2 script that I try? Any and all help will be greatly appreciated!

Many Thanks,

Just off the top of my non-expert pointy li'l head, but it sounds like you need to download and install the Windows SDK (software development kit) as well. The SDK provides all the headers and other stuff needed for developing desktop and mobile apps.

I don't know what Windows version you are using so I can't tell you the SDK version you need. VS2010 IMO kinda cripples you to using the Win7 SDK.

If you upgrade to VS2019 (Community, the free version) you can snag the SDK as part of the install process.

VS2010 is outdated, and will be out of extended (paid) support in a couple of months.
I never understood such "backward" comments, and why would anyone want to target their code for Windows 7 which is no longer supported anyway?

Those people who use Windows 7 and before, it's their mistake not ours who write new code.

One could also say that we should program for Windows 95 because some people still may be using it.

Keep in mind the fact that 'upgrading' to the latest wizz bang shiny new thing will also cut off anyone who isn't rich enough to buy a new computer just to run your code

FYI, you can target older systems with the most recent compiler that comes with (currently)
Visual Studio 2019.

There is absolutely not need to use VS Express from 2010.
First because you'll lack new system API's and modern C++ features that are introduced in new compiler version and you will be forced to write "vintage" code.

You should ask your self this:
1. Will your vintage code (targeted for Windows 7 or older) run on new operating systems in the future instead? Win10 and beyond?
2. Is it worth is to rewrite your code sometime in the future just because you wanted to target some prehistoric operating system?

IMO future is more important than past, and one should focus on future not past.
and I'm sure even B. Stroustroup would agree with me, because as he says, there are trillions of lines of vintage code around and nobody cares to rewrite it because as they say "it works just fine"
Last edited on
Haha, "real world" vs my "bedroom" :D
no I'm not 12 yo. ;)

That's all I'm going to say because I don't feel like willing to argue and write long posts on this matter.

whish you all the best!
@malibor, something the now MIA poster failed to notice in their rant is my entire comment they got mad about is my opinion.

At the very least VS2010 is not Borland C++. 2010 may be old, but not THAT old.

I know people who are still using XP, and I understand their reason(s) for doing it. I don't agree with those reasons*, but I certainly don't get all foaming at the mouth hysterical over it.

*Well, I do agree, in part, with one of the reasons. The tendency of later Windows to be "ET, phone home" as the default nature.
Well people always complained on new OS's when it come out, but in the end majority of them sooner or later switch to new OS.

Maybe the problem is misunderstanding, the missing poster seemed to be talking about commercial software or software which is already close to finished long time ago.

While my aim was at code that isn't written yet or projects which just started recently and completely new project for which IMO one should use latest development tools and practices.
