VB 2008 compiling for 32 bit

  • Thread starter Thread starter Barry Flynn
  • Start date Start date
B

Barry Flynn

Hi

In VB 2008 there seems to be three places where you can specify x86 or
AnyCPU.
1. From the main IDE window, there is a platform drop down box next to the
Debug/Release drop down box
2. From the Build Configuration Manager, there is an "active solution
platform" at the top of the form
3. On the same form, there is a "platform" option in the grid for each
project in the solution.

Which one(s) of those matter? Which one(s) actually specify that you are
building a project for the 32 bit platform?

A semi related question.
For a couple of those choices, x86 does not appear as an option until you go
to the Configuration Manager, and select "new" from the "active solution
platform".
You can then choose x86 as the "new" platform.
However, that form has a "copy settings from" field, with choices of
"anycpu" (the default) or "empty".
What effect does that field have on the "new x86" platform?
I'm nervous about creating a new "x86 option" which in fact is a clone of
the "anycpu" option.

Thanks

Barry
 
Am 24.06.2010 05:02, schrieb Barry Flynn:
Hi

In VB 2008 there seems to be three places where you can specify x86 or
AnyCPU.
1. From the main IDE window, there is a platform drop down box next to the
Debug/Release drop down box
2. From the Build Configuration Manager, there is an "active solution
platform" at the top of the form
3. On the same form, there is a "platform" option in the grid for each
project in the solution.

Which one(s) of those matter? Which one(s) actually specify that you are
building a project for the 32 bit platform?

Yeah, that was confusing me to. So...:

- Each solution platform determines a combination of project platforms.
Usually, if you create a "x64" solution platform, you select the x64
platform for each project in the solution. Same with x86. You could
also create a "mixed" solution platform and specify x86 for projet A
and x64 for project B (but don't ask me if it would make sense).
There is no limited number of solution platforms. Create as many
as combinations of project platforms you need.

- ...whereas there's a limit of three project platforms: Any CPU, x86, x64
You can create one or all of these for each project.

- But: The decisive setting is not the name of the project platform.
The actual platform is the "target CPU" in the "advanced compile settings"
dialog. This setting is stored with each project platform.

- Now the confusing part: You can select the x64 project platform but
set x86 as the target CPU. That's a contradiction, and I don't
know if it's a design flaw or if there's a reason I don't know of.


To answer your question:
1. and 2. are equal. 3. should've been answered above.

A semi related question.
For a couple of those choices, x86 does not appear as an option until you go
to the Configuration Manager, and select "new" from the "active solution
platform".
You can then choose x86 as the "new" platform.
However, that form has a "copy settings from" field, with choices of
"anycpu" (the default) or "empty".
What effect does that field have on the "new x86" platform?
I'm nervous about creating a new "x86 option" which in fact is a clone of
the "anycpu" option.

Several settings, e.g. the "build output path", are platform dependend.
If you choose "empty", the default settings are used for the new platform.
Otherwise they are copied from the selected platform.


Some setting also depend on the configuration (debug, release, ...)
and some depend on both (configuration and platform). It's not
completley clear to me (maybe you find it in the documentation;
in case, please tell me where) which settings depend on what.
It can become a bit clearer if you open the project file with an editor.

Example: Because the "target CPU" depends on configuration and platform,
you could (in theory) set "target CPU" to "x86" for the combination
Debug config + x86 platform, and "AnyCPU" for the combination
Release config + x86 platform.
 
Thank you very much.

Barry

Armin Zingler said:
Am 24.06.2010 05:02, schrieb Barry Flynn:

Yeah, that was confusing me to. So...:

- Each solution platform determines a combination of project platforms.
Usually, if you create a "x64" solution platform, you select the x64
platform for each project in the solution. Same with x86. You could
also create a "mixed" solution platform and specify x86 for projet A
and x64 for project B (but don't ask me if it would make sense).
There is no limited number of solution platforms. Create as many
as combinations of project platforms you need.

- ...whereas there's a limit of three project platforms: Any CPU, x86, x64
You can create one or all of these for each project.

- But: The decisive setting is not the name of the project platform.
The actual platform is the "target CPU" in the "advanced compile
settings"
dialog. This setting is stored with each project platform.

- Now the confusing part: You can select the x64 project platform but
set x86 as the target CPU. That's a contradiction, and I don't
know if it's a design flaw or if there's a reason I don't know of.


To answer your question:
1. and 2. are equal. 3. should've been answered above.



Several settings, e.g. the "build output path", are platform dependend.
If you choose "empty", the default settings are used for the new platform.
Otherwise they are copied from the selected platform.


Some setting also depend on the configuration (debug, release, ...)
and some depend on both (configuration and platform). It's not
completley clear to me (maybe you find it in the documentation;
in case, please tell me where) which settings depend on what.
It can become a bit clearer if you open the project file with an editor.

Example: Because the "target CPU" depends on configuration and platform,
you could (in theory) set "target CPU" to "x86" for the combination
Debug config + x86 platform, and "AnyCPU" for the combination
Release config + x86 platform.
 
Back
Top