64 bit versus 32 bit systems

Posted on 2015-02-09
Last Modified: 2015-02-24

I have a 32 bit version of  the 2008 visual studio. I am a little mixed up with the different places to switch between 64 bit and 32 bit.

I notice that on the top I have a Debug or Release and a platform choice between Win32 and x64. If i choose x64, does it mean that if I used a Custom Build Rule for one of my files , it would also need to use a 64 bit version of a rule file?

Also, when you build for a x64 platform using 32 bit Visual Studio, what actually happens? The libraries linked in etc - are they all magically picked up if they are 64 bit and the 32 bit version are ignored.
What would be different if i used a 64 bit version of Visual Studio and the platform chosen was x64?

Question by:LuckyLucks
LVL 86

Accepted Solution

jkr earned 250 total points
ID: 40599596
That will depend on what the build rule in question does exactly. If it relates to configuration paths, you will have to adapt these if you don't use configuration variables like the ones mentioned in your other question. And regarding the libraries: 32bit libs can't be linked to 64bit code, so if there is no such 64bit version of these libs in the 64bit configuration's library path, you will get a linker error. But usually VS can handle that quite well and transparently when you let it install the 64bit build tools the standard way.
LVL 33

Assisted Solution

sarabande earned 250 total points
ID: 40619180
to add to before comment:

there is no 64-bit version of visual studio. even visual studio 2013 is 32-bit only (and as far as I read, MS doesn't plan to port visual studio to 64-bit). nevertheless visual 32-bit includes a 64-bit compiler (and linker) such that you can build 64-bit programs (and as long as you are in the ms world, it is the only way). the .rules files contain xml code. and there is no 64-bit version of a .rules file, since they belong to the visual studio and the xml is not dependent on the target platform.

beginning with vs 2010, the .rules files were replaced by a triple of .xml, .props and .targets files. but they are neither 32-bit or 64-bit same as the .rules files. note, versions of visual studio younger than vs2008 do no longer support the creation of new rule files. so, migrating from vs2008 would be the easiest way to use a rule from an earlier release in a current version of visual studio (see for more information)

a known limitation for x64 projects is - beside other restrictions - that they can no longer build assembler code. but that also would apply for asm extensions in your source code. so it is as told by jkr, as long as the build rules do not try to mix 32-bit with 64-bit object files or libraries or use features that were not supported by 64-bit projects, you are safe.


Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question