Sign in to follow this  
CDProp

VS2010 Configuration & Platform

Recommended Posts

CDProp    1451
Hello,

I'm working on a Windows 7 x64 system, but I might want to build for x86 systems as well. I'm just trying to understand the Configuration Manager. It's a little bit confusing to me.

My understanding is that Configuration refers to a set of project settings. By default, there are Release and Debug configurations. For the most part, these two configurations differ in that the Release configuration has optimizations turn on, links to the debug CRTs, and debugging information is not generated (or perhaps public symbols only). The Debug configuration has optimizations turned off, links to the release CRTs, and debugging information with full symbol files is created. One can add more configurations if they want (a common scenario is that the developer wants a special release build that is optimized to be small in size).

Platform, on the other hand, refers to the CPU that is being targeted (or maybe it's more precise to say that it refers to the OS being targeted). The options here, I guess, would be x86, x64, and ia64.

In some projects (.NET only?), you can set the Platform to "AnyCPU", which means that the assembly determines which mode to run in during runtime. If it's being run on a 32-bit OS, it will run in 32-bit mode. If it's running on a 64-bit OS, then it will run in 64-bit mode. This is nice and convenient in a lot of ways, but you have to make sure that all of its dependencies are using the same format or else you'll get all sorts of BadImageFormat exceptions.

I have a few questions:

1. What is Win32? To me, that's the name of an API, not a CPU. Does the term "Platform", as it's used here, entail more than just the CPU? If so, are Win32 and x86 necessarily mutually-exclusive? And why don't I see Win32 as an option when adding a new platform type to a project?

2. So, in the Configuration Manager, if I select a certain Solution Configuration and Platform, I see the project settings for that Solution Configuration / Platform pair. I understand why the Build check marks are there, because I might not want a Debug Win32 version of ProjectY to be built. However, what is the deal with the project-level specification of the configuration and platform? Why would I want to select Debug Win32 Solution Configuration / Platform, only to have it build something else?

3. When adding a new Project or Solution platform, it asks me which other platform I want to inherit settings from. What settings? For instance, what would happen if I'm adding an x64 platform, and I tell it to inherit settings from Win32? What does that even mean?

Thanks.

Share this post


Link to post
Share on other sites
ryan20fun    2635
[quote name='CDProp' timestamp='1305683993' post='4812212']
Hello,

I'm working on a Windows 7 x64 system, but I might want to build for x86 systems as well. I'm just trying to understand the Configuration Manager. It's a little bit confusing to me.

My understanding is that Configuration refers to a set of project settings. By default, there are Release and Debug configurations. For the most part, these two configurations differ in that the Release configuration has optimizations turn on, links to the debug CRTs, and debugging information is not generated (or perhaps public symbols only). The Debug configuration has optimizations turned off, links to the release CRTs, and debugging information with full symbol files is created. One can add more configurations if they want (a common scenario is that the developer wants a special release build that is optimized to be small in size).

Platform, on the other hand, refers to the CPU that is being targeted (or maybe it's more precise to say that it refers to the OS being targeted). The options here, I guess, would be x86, x64, and ia64.

In some projects (.NET only?), you can set the Platform to "AnyCPU", which means that the assembly determines which mode to run in during runtime. If it's being run on a 32-bit OS, it will run in 32-bit mode. If it's running on a 64-bit OS, then it will run in 64-bit mode. This is nice and convenient in a lot of ways, but you have to make sure that all of its dependencies are using the same format or else you'll get all sorts of BadImageFormat exceptions.

I have a few questions:

1. What is Win32? To me, that's the name of an API, not a CPU. Does the term "Platform", as it's used here, entail more than just the CPU? If so, are Win32 and x86 necessarily mutually-exclusive? And why don't I see Win32 as an option when adding a new platform type to a project?

2. So, in the Configuration Manager, if I select a certain Solution Configuration and Platform, I see the project settings for that Solution Configuration / Platform pair. I understand why the Build check marks are there, because I might not want a Debug Win32 version of ProjectY to be built. However, what is the deal with the project-level specification of the configuration and platform? Why would I want to select Debug Win32 Solution Configuration / Platform, only to have it build something else?

3. When adding a new Project or Solution platform, it asks me which other platform I want to inherit settings from. What settings? For instance, what would happen if I'm adding an x64 platform, and I tell it to inherit settings from Win32? What does that even mean?

Thanks.
[/quote]

ok, thats i bit wierd.
im useing a 64Bit OS right now and my default project is 32Bit, but im shure MSDN will hape a better explanation / tutorial on how to do this.

what i did to get my app in 64bit was to open the configuration manager and then select the platform box and select new then copy the settings from the 64bit and change the calling convention to _cdecl (default for x86 apps) or _stdcall but yours should be set to _fastcall(as that is what MSDN says is the default setting for x64 apps)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this