• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Lesson 4. Creating the 64-bit configuration
 

Lesson 4. Creating the 64-bit configuration

on

  • 663 views

At first you should make sure that the Visual Studio edition you are using allows building 64-bit code. If you want to develop 64-bit applications using the latest (at the moment of writing this ...

At first you should make sure that the Visual Studio edition you are using allows building 64-bit code. If you want to develop 64-bit applications using the latest (at the moment of writing this course) Visual Studio 2008 version, here is a table that will help you understand what Visual Studio edition you need.

Statistics

Views

Total Views
663
Views on SlideShare
663
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Lesson 4. Creating the 64-bit configuration Lesson 4. Creating the 64-bit configuration Document Transcript

    • Lesson 4. Creating the 64-bitconfigurationCompilerAt first you should make sure that the Visual Studio edition you are using allows building 64-bit code. Ifyou want to develop 64-bit applications using the latest (at the moment of writing this course) VisualStudio 2008 version, here is a table that will help you understand what Visual Studio edition you need. Table 1 - Capabilities of different Visual Studio 2008 editionsIf the Visual Studio edition you are using allows creating 64-bit code, you should check if the 64-bitcompiler is installed. Figure 1 shows the page of installing Visual Studio 2008 components whereinstallation of the 64-bit compiler is disabled.
    • Figure 1 - The 64-bit compiler is disabled when installing Visual Studio 2008Creating the 64-bit configurationCreating the 64-bit version of a project in Visual Studio 2005/2008 is a rather simple procedure.Difficulties will appear later at the step of building the new configuration and searching for errors in it.To create a 64-bit configuration you should make the following 4 steps:Step 1Open the configuration manager as shown in Figure 2: Figure 2 - Launching the configuration managerStep 2Choose support of the new platform in the configuration manager (Figure 3): Figure 3 - Creating a new configurationStep 3Choose the 64-bit platform (x64) and take the 32-bit version settings as the base (Figure 4). Visual Studioenvironment will automatically modify those settings that impact the build mode.
    • Figure 4 - Choosing x64 as the platform and loading the Win32 configuration as the baseStep 4You have added the new configuration and now may select the 64-bit configuration version and startcompiling the 64-bit application. Figure 5 shows how to choose the 64-bit building configuration. Figure 5 - Now you have both the 32-bit and 64-bit configurationsModifying parametersIf you are lucky, you will not have to adjust the 64-bit project. But this depends upon the project, itscomplexity and the number of libraries being used. The only thing you should modify right away is thestack size. If your project uses the stack of the default size, i.e. 1 Mbyte, you should change it to 2-3Mbytes for the 64-bit version. It is not necessary but it is better to secure yourself from possible issuesbeforehand. If you use the stack of a size different from that by default, you should make it twice-thricelarger for the 64-bit version. To do it find and change the parameters Stack Reserve Size and StackCommit Size in the project settings (see Figure 6).
    • Figure 6 - Location of project settings defining the stack sizeWhat next?Having the 64-bit configuration of a project does not mean that it will compile well and work at all. Theprocess of compilation and detection of hidden errors will be discussed in the next lessons.The course authors: Andrey Karpov (karpov@viva64.com), Evgeniy Ryzhkov (evg@viva64.com).The rightholder of the course "Lessons on development of 64-bit C/C++ applications" is OOO "ProgramVerification Systems". The company develops software in the sphere of source program code analysis.The companys site: http://www.viva64.com.Contacts: e-mail: support@viva64.com, Tula, 300027, PO box 1800.