Part Number Hot Search : 
BYD127 CFC0301 RA502 C74VC 5925B AME88 SD220 RBC2725
Product Description
Full Text Search
 

To Download 30887 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  building amd64 applications with the microsoft ? platform sdk developer application note 30887 publication # 3.00 revision: october 2003 issue date:
? 2003 advanced micro devices, inc. all rights reserved. the contents of this document are provided in connection with advanced micro devices, inc. (?amd?) products. amd makes no represen tations or warranties with respect to the accuracy or completeness of the contents of this publication and reserves the right to make changes to specifications and product descrip tions at any time without notice. no license, whether express, implied, arising by estoppel or otherwise, to any intellectual property rights is granted by this publication. excep t as set forth in amd?s standard terms and conditions of sale, amd assu mes no liability whatsoever, an d disclaims any express or implied warranty, relating to its products including, but no t limited to, the implied warranty of merchantability, fitness for a particular purpos e, or infringement of any intellectual prop- erty right. amd?s products are not designed, intended, aut horized or warranted for use as components in systems intended for surgical implant into th e body, or in other applications intended to support or sustain life, or in any other application in which the failure of amd?s product could create a situation where personal injury, death, or severe property or environmental damage may occur. amd reserves the right to discontinue or make changes to its products at any time without notice. trademarks amd, the amd arrow logo, amd athlon, amd opteron, and combinations thereof are trademarks of advanced micro devices, inc. microsoft and windows are registered trademarks of microsoft corporation. other product names used in this publicati on are for identification purposes only and ma y be trademarks of their respective com panies.
contents 1 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 contents revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 chapter 1 using the microsoft ? platform sdk for amd64 developm ent . . . . . . . . . . . . . . .5 1.1 audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 1.2 technical preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 1.3 in this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 chapter 2 using visual studio . net on win32 to develop 64-bit applications . . . . . . . . . .7 2.1 configuring your 32-bit ide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 chapter 3 developing 64-bit windows ? applications with visual studi o 6 . . . . . . . . . . . . .9 3.1 installing the windows platform sdk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 3.1.1 win32-based systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 3.1.2 installing the wind ows platform sdk on amd64 processor-based systems 9 3.2 setting up visual studio 6 id e to compile 64-bit code for amd64 processor-based systems 10 3.3 build an amd64 application with the visual studi o 6 ide . . . . . . . . . . . . . . . . . . .10 3.4 start visual studio 6 with 64-bit build environment. . . . . . . . . . . . . . . . . . . . . . . . . .11
2 contents 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk
revision history 3 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 revision history date revision description october 2003 3.00 initial release.
4 revision history 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk
chapter 1 using the microsoft? pl atform sdk for amd64 development 5 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 chapter 1 using the microsoft ? platform sdk for amd64 development microsoft visual studio 6 w ith service pack 4 or later (including visual studio 6 with service pack 5, visual studio .net ,and visual studio .net 2003) ma y be used to develop 64-bit applications for amd64 platforms using the microsoft ? platform software development kit (sdk). these development environments may also be used to por t existing 32-bit visual studio projects to a 64-bit operating environment. the principa l complications arising when usi ng these ides involve the proper installation of the platform sdk and configurat ion of the working environment and development software for compiling and building 64-bit amd 64 applications. this document addresses these interrelated issues. 1.1 audience this document is intended for the programmer who is creating 64-bit software for deployment in a 64-bit microsoft windows ? operating environment on amd athlon? 64 or amd opteron? processor-based platforms. 1.2 technical preliminaries the windows platform sdk supports platform development for amd64 systems running the microsoft windows 64-bit operating system for am d64 processor-based systems. the microsoft platform sdk includes the 64-bit compiler/linker and other tools, along with the c run-time (crt), microsoft foundation class (mfc) and active te mplate (atl) libraries. you can obtain the platform sdk for amd64 platforms free of charge from microsoft on msdn or betapl ace, as part of the amd64 64-bit windows beta program. once you have the platform sdk, there are two approaches from which to choose:  you can install the platform sdk on any pc running 32-bit windows, a nd cross-compile your source code as an amd64 application for de ployment and testing on a separate amd64 processor-based 64-bit windows ?target? inst allation. amd recommends this development environment, although it requires two separate pcs or two boot part itions on an amd64 processor-based machine: a 32-bit developmen t system and a 64-bit test platform.  you can install the platform sdk directly on an amd64 processo r-based 64-bit machine, so you can build and run the appli cation on the same machine. the components of the platform sdk assume that the path, include, and lib environment variables have certain values that are different from those assumed by the tools provided in visual studio and visual studio .net. to build a 64-bit a pplication, the platform sd k environment variable settings must be passed to visual studio 6 or vi sual studio .net for use during the build process. visual studio 6 (sp4 and sp5), visual stud io .net, and visual studio .net 2003 allow the
6 using the microsoft? platform sd k for amd64 development chapter 1 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk development environment to be started from the command line. command line options (switches) allow the user to open visual studio or visual studio .net with special configuration information. one such switch is /useenv . (command-line switches are not case sensitive.) starting visual studio 6 (service pack 4 or 5) or visual studio .net on the command line with the / useenv switch superimposes the compiler, linker, and path settings from the environment over the usual system-wide ide default settings. this enables visual studio 6 or visual studio .net to use the platform sdk?s predefined environment setti ngs, which are accessible from the start menu and allows the use of the 64-bit tools, libraries a nd header files from the platform sdk to build applications for 64-bit windows. 1.3 in this book chapter 2 describes the procedur es used to build your application with the platform sdk using microsoft visual studio .net on a windows 32-bit development system (win32 host). chapter 3 describes the use of the platform sdk to devel op or port 64-bit applic ations in a windows environment running on either a 32-bit or 64-bit amd64 processor-based sy stem using microsoft visual studio 6.
chapter 2 using visual studio . net on win32 to develop 64-bit applications 7 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 chapter 2 using visual studio . net on win32 to develop 64-bit applications this chapter describes the use of the platform sdk to develop 64-bit applications in a 32-bit windows ? environment using microsoft ? visual studio .net. after co mpilation and building, 64-bit applications can be instal led on systems running a 64-bit windows operating system on amd athlon? 64 or amd opteron? processor-based systems. this document describes the preliminary steps necessary to convert an existing 32-bit visual studio .net application to 64 bits. 2.1 configuring your 32-bit ide first, install visual studio .net on your 32-bit windows development computer. also install the windows platform sdk that supports amd64 development. next steps: step 1. open the command consol e to set up the pre-defined environment for a 64-bit retail build. 1. on the start menu, find the microsoft platform sdk group. 2. choose open build environment window submenu. 3. choose the windows server 2003 64-bit build environment submenu. 4. select set win svr 2003 amd build env (retail, prerelease) . 5. this command opens a console window with path, include, and lib build environment variables set for a 64-bit build. step 2. start visual studi o .net at the command li ne using command line options. 1. change directories at th e console command prompt: cd ?c:\program files\microsoft visu al studio .net 2003\common7\ide? 2. start visual studio .net from the comma nd line with the /useenv command switch: devenv /useenv visual studio .net opens with path, include, and lib environm ent variables set for 64-bit compilation and linking. step 3. open an existing project and add a config uration ?release64.? task 1?navigate to your project subdirectory. 1. open your 32-bit visual studio project.
8 using visual studio . net on win32 to develop 64-bit applications chapter 2 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk task 2?add a new 64-bit configuration to the existing project, if necessary. 1. in the build menu choose configuration manager . 2. select the drop down for active solution configuration . 3. select new... to create a new configuration. 4. add a new configuration based on release settings and call it release64 . 5. notice that the default confi guration is now the 64-bit choice. 6. close the configuration dialog. step 3. change the re lease64 configuration opt ions for 64-bit build. to compile the 64-bit application, you must change th e various compiler and li nker options that are specific to a given build configuration. task 1?change the build options to compile a 64-bit application. 1. highlight your project file in the visual studio .net solution explorer window. 2. click on the property pages icon in the tool bar of the properties window. this displays the property pages window for your project. 3. go to the c/c++ node and highlight general . 4. under general settings change the debug info format to program database (/zi) . 5. go to the linker node. 6. go to the command line settings section. this displays the currently avai lable command-line options and the additional options text box. 7. type /machine:amd64 in the additional options text box and click ok . this tells the linker which libraries to choose. you can now build your 64-bit release code. task 2?build 64-bit code with 32-bit visual studio .net 1. from the build menu select build solution . 2. the code should compile and link successfully. 3. you can now copy the executable to the 64-bit target system and run it.
chapter 3 developing 64-bit windows? a pplications with visual studio 6 9 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 chapter 3 developing 64-bit windows ? applications with visual studio 6 some visual studio ides are subject to certain restricti ons when running on 64-bit amd64 platforms. in particular, microsoft ? visual studio .net is not curr ently available for use on amd64 processor-based systems. the following procedur es describe configurati on considerations for developing 64-bit applications usi ng microsoft visual studio 6 (ser vice pack 4 or 5) on 64-bit amd64 platforms under a microsoft 64-bit windows ? operating system. you may also follow the same procedures to set up a development system on 32-bit windows running visual studio 6 to develop 64-bit applications for testing on a 64-bit amd64 processor-based system. 3.1 installing the windows ? platform sdk the process of installing the windows platfo rm sdk for amd64 on a 64-bit windows host is different from the insta llation procedure on a 32-bit host. th e following proce dures assume a cd- rom installation. 3.1.1 win32-based systems first, install visual studio 6 (with service pa ck 4 or 5) on your 32-bit windows development computer. then install the windows platform sdk that supports amd64 development. this platform sdk is available for download on microsoft msdn and betaplace or on cd-rom. 3.1.2 installing the windows ? platform sdk on amd64 processor-based systems the top-level installer will proba bly not run under win64; this is expected. to work around this: 1. right-click the cd-ro m icon and select explore . 2. navigate into the \setup directory, and install the followi ng three microsoft windows installer components by double-clicking them a nd accepting all the default settings: coresdk-x86.msi mdacsdk-x86.msi psdk-x86.msi this installs the amd64 tools and libraries. note: you may try installing additional co mponents by double- clicking their .msi files, if some files required by your application appear to be missing. if you are comfortable using comma nd-line tools, you can now use th e platform sdk tools from the command line. if you have an existing visual studio 6 project, load it into visual studio 6 and use project/export makefile? to write a makefile, then use the command-line tools with that makefile
10 developing 64-bit window s? applications with visual studio 6 chapter 3 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk as input. you can still keep your visual studio 6 pr oject as the master, editing the project from the ide, and generating new makefiles when necessary. if you choose to use the command-line tools this way, you can skip the remainder of this document. 3.2 setting up visual studio 6 ide to compile 64-bit code for amd64 processor-based systems once you have the amd64 platform sdk installed, you can use the visual studio 6 ide to build 64- bit applications. this is convenient if you have existing 32-bit applications that you would like to migrate to 64-bit, because this a llows you to maintain a 64-bit build as a different build configuration of the same project. this leaves you with only one set of sour ce files to manage. after you have installed these products, take the fo llowing steps to assure that visual studio 6 uses the amd64 compiler. 3.3 build an amd64 application with the visual studio 6 ide because of basic differences in th e installation of the platform sdk, the build process is different when using visual studio 6 on a win32 system th an when using an amd64 processor-based system. the first task is to open a dos command window. task 1?set the build options to compile a 64-bit application. development on 32 -bit windows: 1. on the start menu, find the microsoft platform sdk group. 2. choose open build environment window submenu. 3. choose the windows server 2003 64-bit build environment submenu. 4. select set win svr 2003 amd build env (retail, prerelease) . 5. this command opens a console window with path, include, and lib build environment variables set for a 64-bit build. note: do not close this command window! development on 64-bit windows: 1. set the 64-bit build environment. a. on the start menu, find run and enter ?cmd? . this opens a command console window. b. change to the \program files (x86)\microsoft sdk directory. c. run the setenv.bat batch program.
chapter 3 developing 64-bit windows? a pplications with visual studio 6 11 building amd64 applications with the microsoft? platform sdk 30887 rev. 3.00 october 2003 setenv /amd64 /debug or setenv /amd64 /retail ignore any warning message such as ?\microsoft was unexpected at this time.? the setenv.bat batch file sets the appropriate envi ronment variables for the platform sdk build environment with respect to operating system a nd platform type. note: do not close this command window! 3.4 start visual studio 6 with 64-bit build environment. 1. in the same command window as used in step 1 , start visual studio 6 by running the following command: msdev /useenv this command starts the visual studio 6 ide with the include, library a nd executable directories set for the 64-bit build environment. if msdev.exe is not in the path, navigate to the ..\microsoft visual studio\co mmon\msdev98\bin directory before running msdev.exe . 2. in visual studio, open your project. 3. add a 64-bit debug or retail configuration, if necessary. a. on the build menu, choose configurations . b. in the configurations dialog, click the add button. c. in the add project configuration dialog, set the configuration to debug64 | retail64 and set copy settings from to your project name ? win32 debug | retail . d. click ok button and then the close button to add the configuration. 4. set the active configuration to 64-bit. on the build menu, choose set active configuration to your project name - win32 debug64 | retail64 . 5. modify project settings. there are a few visual studio 6 compiler/linker opt ions that do not apply to a 64-bit compile or link. they must be modified to avoid errors or warnings. a. in the project settings , select the general tab and change the intermediate files and output files directories to debug64 | retail64 . b. in the project settings , select the c/c++ tab. set the debug info to program database (compiler option, /zi ). c. in the project settings , select the c/c++ tab. in the project options , remove the /gz option. this disables runtime checking.
12 developing 64-bit window s? applications with visual studio 6 chapter 3 30887 rev. 3.00 october 2003 building amd64 applications with the microsoft? platform sdk d. in the project settings , select the link tab. in the p roject options , change ?/machine:i386? to ?/machine:amd64? . (you may need to scroll down to see this.) e. in the project settings , click ok f. in the workspace window (left edge of screen) select the file view tab, highlight the your project name .hpj file and press the del key to delete this file from the project, if it exists. g. from the tools menu select options . under the directories tab, select library files from the show directories for: drop-down box. add the paths: c:\microsoft sdk\lib\amd64 and c:\microsoft sdk\lib\amd64\mfc , if not listed. delete all other library paths. 6. build the project. now you have a 64-bit appl ication that is ready to be run on an amd64 system with win64. note that you can run an .exe file from the visual studio 6 ide. fo llow steps below to do so. note that you cannot debug the .exe from the visual studio 6 ide. to debug your project refer to step 8. 7. to run your application from inside the vi sual studio ide, run the program using the build/execute menu. 8. to debug, use windbg or ntsd which are included with win64 or the microsoft windows driver development kit (ddk), both available from msdn.


▲Up To Search▲   

 
Price & Availability of 30887

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X