I am running VS Team System 2008 on WinXP. I make a new Win32 C++ project (Empty project). I go to Build Configuration to add a configuration for x64.
The only options I have are:
- Pocket PC 2003 (ARMV4)
- Smartphone 2003 (ARMV4)
I have no option for x64 (or Itanium). However, if I make a C# project within the same solution, I can create and select an x64 option for that project with no issues. But even then, when the x64 build configuration has been created, I still cannot select it for the C++ project - only for the C# project.
I have done this before on another system - creating an x64 config for a Win32 C++ project. But I can't do it now. Any ideas why? Something small/obvious no doubt, since google has offered no help. Thanks!
Maybe you didn't install the native x64 compiler.
Try to run setup again, and look if you selected the native x64 C++ compiler.
Related
I'm using Visual Studio for c++ programming, and after working and writing programs in x86 environment (32bit Mode) I tried to build my x86 project in x64 environment so I thought that I should create a win64 console project instead of win32 console project but there were not such as an option in VC2010 . so I want to ask that for building x64 projects I should also choose win32 project and change the settings for compiling in x64 inside the project using instruction in here?
I'm using windows 7 64bit.
if your answer is yes then why it is called win32?
"Win32" is the name of the OS API.
"Win32 Console Application" got its name from the API (not from bit-ness).
Win32 API can be used both by 32-bit and by 64-bit applications. So, a Win32 Console Application can be built both for 32-bit and for 64-bit. For the latter, create the "x64" configuration in the Configuration Manager.
The other answers pretty much have it covered, but I thought I might add the following clarifications:
X86 is for Intel/AMD's 32 bit chip set. Win32 can support other chipsets, such as ARM in a Windows Mobile project.
Furthermore, when building native c++ applications for x86, the platform will actually be called win32.
I think there is a confusion here, tell me if I am wrong, but you're basically have problems setting up your console program to the x64 platform.
If you're using the express version you will need to install a proper Microsoft Windows SDK for Windows 7 and .NET Framework 4 and SP1, as stated on the link you provided otherwise the x64 platform option won't be available. Have you already done this?
Once done this, switching to the x64 will be pretty easy, you will get the option on the dropdown list of the platforms, should compile fine (and no, you don't need to use the win32 configuration).
I'm using Visual Studio for c++ programming, and after working and writing programs in x86 environment (32bit Mode) I tried to build my x86 project in x64 environment so I thought that I should create a win64 console project instead of win32 console project but there were not such as an option in VC2010 . so I want to ask that for building x64 projects I should also choose win32 project and change the settings for compiling in x64 inside the project using instruction in here?
I'm using windows 7 64bit.
if your answer is yes then why it is called win32?
"Win32" is the name of the OS API.
"Win32 Console Application" got its name from the API (not from bit-ness).
Win32 API can be used both by 32-bit and by 64-bit applications. So, a Win32 Console Application can be built both for 32-bit and for 64-bit. For the latter, create the "x64" configuration in the Configuration Manager.
The other answers pretty much have it covered, but I thought I might add the following clarifications:
X86 is for Intel/AMD's 32 bit chip set. Win32 can support other chipsets, such as ARM in a Windows Mobile project.
Furthermore, when building native c++ applications for x86, the platform will actually be called win32.
I think there is a confusion here, tell me if I am wrong, but you're basically have problems setting up your console program to the x64 platform.
If you're using the express version you will need to install a proper Microsoft Windows SDK for Windows 7 and .NET Framework 4 and SP1, as stated on the link you provided otherwise the x64 platform option won't be available. Have you already done this?
Once done this, switching to the x64 will be pretty easy, you will get the option on the dropdown list of the platforms, should compile fine (and no, you don't need to use the win32 configuration).
Is there a simple way to compile a 64 bit app with the 32-bit edition of Visual C++ 2010 Express? What configurations, if any, are necessary?
Here are step by step instructions:
Download and install the Windows Software Development Kit version 7.1. Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. A link to the SDK: http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx
Change your project configuration. Go to Properties of your project. On the top of the dialog box there will be a "Configuration" drop-down menu. Make sure that selects "All Configurations." There will also be a "Platform" drop-down that will read "Win32." Finally on the right there is a "Configuration Manager" button - press it. In the dialog that comes up, find your project, hit the Platform drop-down, select New, then select x64. Now change the "Active solution platform" drop-down menu to "x64." When you return to the Properties dialog box, the "Platform" drop-down should now read "x64."
Finally, change your toolset. In the Properties menu of your project, under Configuration Properties | General, change Platform Toolset from "v100" to "Windows7.1SDK".
These steps have worked for me, anyway. Some more details on step 2 can be found in a reference from Microsoft that a previous poster mentioned: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx.
64-bit tools are not available on
Visual C++ Express by default. To
enable 64-bit tools on Visual C++
Express, install the Windows Software
Development Kit (SDK) in addition to
Visual C++ Express. Otherwise, an
error occurs when you attempt to
configure a project to target a 64-bit
platform using Visual C++ Express.
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
Ref:
http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
And make sure you download the Windows7.1 SDK, not just the Windows 7 one. That caused me a lot of head pounding.
I found an important step to add to this - after you've installed the SDK, go to your project properties and change Configuration Properties->General->Platform Toolset from v100 or whatever it is to Windows7.1SDK. This changes $(WindowsSdkDir) to the proper place and seemed to solve some other difficulties I was encountering as well.
Note that Visual C++ compilers are removed when you upgrade Visual Studio 2010 Professional or Visual Studio 2010 Express to Visual Studio 2010 SP1 if Windows SDK v7.1 is installed.
For instructions on resolving this, see KB2519277 on the Microsoft Support site.
Download the Windows SDK and then go to View->Properties->Configuration Manager->Active Solution Platform->New->x64.
Programming in a 64-bit environment is quite different than 32-bit environment.
Code generated has totally different assembly constitution in 32 & 64-bit code, even the protocols of communicating with functions change. So you can't generate 64-bit code using 32-bit compiler.
You might want to see an article on Microsoft's web site about targeting a 64-bit target but using a 32-bit development machine.
As what Jakob said: windows sdk 7.1 cannot be installed if MS VC++ x64 and x86 runtimes and redisrtibutables of version 10.0.40219 are present. after removing them win sdk install is okay, VS C++ SP1 can be installed fine again.
Kind regards
I would like to start making my application's 64bit, however, I am not sure on the changes I should make on my sln and vsproj files. What changes should I make to my sln and vsproj to make them 64bit?
On the same note, are there changes to the default sln or project file that are good for game development? I am using Visual Studio 2010.
From the VS menu select Build|Configuration Manager.
On the Configuration Manager dialog, open the Platform drop down and select <New...>.
On the New Project Platform dialog select x64 as your platform and click Ok.
To add to what was said before, make sure you understand why you need 64-bit support. In most cases you won't need access to larger memory allocations. Also, be aware that there will be x86/x64 P/Invoke compatibility problems (if you plan on using third-party unmanaged assemblies - in case you are working with managed C++).
For more information, read what Scott Hanselman has to say about this. Also, just as a sidenote, I would recommend reading this blog post that explains some of the migration ideas.
you need to add x64 solution platform:
Build -> Configuration Manager -> Active Solution Platform -> New -> New platform = x64
if you don't see "x64" make sure you installed it in Visual Studio installer
then just select "x64" as active solution platform and build
Is there a simple way to compile a 64 bit app with the 32-bit edition of Visual C++ 2010 Express? What configurations, if any, are necessary?
Here are step by step instructions:
Download and install the Windows Software Development Kit version 7.1. Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. A link to the SDK: http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx
Change your project configuration. Go to Properties of your project. On the top of the dialog box there will be a "Configuration" drop-down menu. Make sure that selects "All Configurations." There will also be a "Platform" drop-down that will read "Win32." Finally on the right there is a "Configuration Manager" button - press it. In the dialog that comes up, find your project, hit the Platform drop-down, select New, then select x64. Now change the "Active solution platform" drop-down menu to "x64." When you return to the Properties dialog box, the "Platform" drop-down should now read "x64."
Finally, change your toolset. In the Properties menu of your project, under Configuration Properties | General, change Platform Toolset from "v100" to "Windows7.1SDK".
These steps have worked for me, anyway. Some more details on step 2 can be found in a reference from Microsoft that a previous poster mentioned: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx.
64-bit tools are not available on
Visual C++ Express by default. To
enable 64-bit tools on Visual C++
Express, install the Windows Software
Development Kit (SDK) in addition to
Visual C++ Express. Otherwise, an
error occurs when you attempt to
configure a project to target a 64-bit
platform using Visual C++ Express.
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
Ref:
http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
And make sure you download the Windows7.1 SDK, not just the Windows 7 one. That caused me a lot of head pounding.
I found an important step to add to this - after you've installed the SDK, go to your project properties and change Configuration Properties->General->Platform Toolset from v100 or whatever it is to Windows7.1SDK. This changes $(WindowsSdkDir) to the proper place and seemed to solve some other difficulties I was encountering as well.
Note that Visual C++ compilers are removed when you upgrade Visual Studio 2010 Professional or Visual Studio 2010 Express to Visual Studio 2010 SP1 if Windows SDK v7.1 is installed.
For instructions on resolving this, see KB2519277 on the Microsoft Support site.
Download the Windows SDK and then go to View->Properties->Configuration Manager->Active Solution Platform->New->x64.
Programming in a 64-bit environment is quite different than 32-bit environment.
Code generated has totally different assembly constitution in 32 & 64-bit code, even the protocols of communicating with functions change. So you can't generate 64-bit code using 32-bit compiler.
You might want to see an article on Microsoft's web site about targeting a 64-bit target but using a 32-bit development machine.
As what Jakob said: windows sdk 7.1 cannot be installed if MS VC++ x64 and x86 runtimes and redisrtibutables of version 10.0.40219 are present. after removing them win sdk install is okay, VS C++ SP1 can be installed fine again.
Kind regards