Solved

64 bit versus 32 bit systems

Posted on 2015-02-09
2
141 Views
Last Modified: 2015-02-24
Hi

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?

thanks
0
Comment
Question by:LuckyLucks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
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.
0
 
LVL 34

Assisted Solution

by:sarabande
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 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.

Sara
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

729 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