Solved

64 bit versus 32 bit systems

Posted on 2015-02-09
2
115 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
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
Comment Utility
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 32

Assisted Solution

by:sarabande
sarabande earned 250 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now