Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


64 bit versus 32 bit systems

Posted on 2015-02-09
Medium Priority
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 1000 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 35

Assisted Solution

sarabande earned 1000 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 https://msdn.microsoft.com/en-us/library/ee862524(v=vs.120).aspx 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

564 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