Debugging 64-bit applications using Visual Studio 2005

本文详细介绍了在64位操作系统中使用Visual Studio 2005进行应用程序开发的方法,包括创建、构建及调试64位应用程序的具体步骤。文中还特别指出,虽然Visual Studio 2005本身为32位应用,但可以在64位系统上安装并用来开发64位应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FAQ of 64-bit and Visual Studio 2005

[http://blogs.msdn.com/deeptanshuv/archive/2006/04/11/573795.aspx]

64-bit and Visual Studio 2005

We keep receiving questions about Visual Studio 2005's support for 64-bit.  Here is a set of factoids that should help answer the most commonly enquired issues:

(a) There are two flavours of 64-bit - AMD64 or X64, and IA64.  Windows 64-bit installs on both architectures.

(b) There is no 64-bit version of VS. Visual Studio 2005 is available only as a 32-bit app.  However, you CAN install VS on a 64-bit OS and use it to create, launch and debug 64-bit apps. 

(c) VS will install only on X64.  The .Net Framework and the Debugger components install on IA64, allowing you to remotely launch and debug applications on IA64 from a VS IDE installed on another machine.

(d) VS installed on either 32-bit or 64-bit OS can create 32-bit or 64-bit applications, but of course the applications need the corresponding platform to execute.

(e) You need the Professional or Team System versions to build X64 (AMD64) apps. 

(f) You need Team System to build IA64 apps. Pro does not support this. See http://msdn2.microsoft.com/en-us/library/hs24szh9(VS.80).aspx

(g) On a 32-bit OS, the 64-bit compilers will not be installed by default, you will need to go to custom setup and check the option.

How to create 64-bit apps

A managed project is automatically built according to the architecture selected => default C# project created on AMD64 will be AMD64, X86 on X86.  The native one is always 32-bit by default.

To explicitly set a platform:

(1) open the solution explorer, select solution, right click->Configuration Manager.
(2) go to 'Active Solution Platform', click New.
(3) in the 'New Solution Platform' dialog that comes up select the new platform say Itanium. Set 'Copy Settings From' to 'Any CPU' which was the default setting in the 'Active Solution Platform'.
(4) click OK.

You will see that the platform has changed to Itanium in the config manager.  Now when you build the  solution, you will get an Itanium exe.

Follow the same process for X64, and to rebuild 32-bit apps from that solution.

 

Debugging 64-bit applications using Visual Studio 2005

 A short note on this issue that I came across recently. Let’s say we are trying to debug a managed/unmanaged code in Visual Studio 2005 in a 64-bit machine. We complete the code and hit F5 (debug the application), and land up with the following error:

Error while trying to run project: Unable to start debugging.
The components for the 64-bit debugger are not registered. Please repair your Visual Studio 2005 Remote Debugger installation via 'Add or Remove Programs' in Control Panel.

Okay all that we are doing is debugging an application in the local machine. So why should there be a problem with the remote debugger installation?

Here is some background on how debugging works in 64-bit environment that explains why you see this error message.
Even on a 64-bit machine, Visual Studio runs as a 32-bit application. This means that Visual Studio would run in the Windows-on-Windows (WoW64) layer. It would not be possible to attach a 32-bit debugger to a 64-bit process. However, if you want to debug a 64-bit application, there is something special that Visual Studio does to make this possible. We would achieve this pseudo-remotely. You are running the debugger on the same machine as the process but debugging is done through the remote debugger. All this happens behind the scenes and you as a developer would not need to do anything special.

Now, if you are seeing this error on a 64-bit machine, I would assume that the remote debugging components were not included during the Visual Studio installation process. All that we would need to do is install the remote debugging components.

 

MSDN official note:

When you run Visual Studio 2005 under WOW mode to debug a 64-bit application on the same machine, Visual Studio 2005 appears to be doing normal local debugging. However, Visual Studio 2005 is actually using the remote debugging mechanism to connect from WOW to the 64-bit application. Therefore, all considerations that apply to remote debugging also apply to local debugging on a 64-bit platform.

 

转载于:https://www.cnblogs.com/taoxu0903/archive/2008/09/04/1284687.html

1. Compilation 1.1 Windows A workspace for MS Visual Studio is provided with the name "hpm_vsXXXX.sln" in the directory "build\x86_windows". It contains the encoder and decoder projects. 1.2 Unix/Linux Makefiles are provided in the directory "build\x86_linux". 'make' command will create the obj files and generate the executable file in the 'bin' directory. 1.3 CMake for HPM Example for Windows: mkdir build_cmake cd build_cmake cmake .. -G open "HPM.sln" in build_cmake directory to generate the executable files to "build_cmake/app/Debug" or "build_cmake/app/Release" directory. Example for Linux: mkdir build_cmake cd build_cmake cmake .. make -j 'make' command will generate the executable file to the 'build_cmake/app' directory. ******************************************************************* 2. Command line parameters 2.1 Encoder encoder_app [--config file] [-paramShort ParameterValue] [--paramLong ParameterValue] --config file All Parameters are initially taken from the 'file', typically: "encode_RA.cfg". -paramShort ParameterValue --paramLong ParameterValue If -paramShort or --paramLong parameters are present, then the ParameterValue will override the default settings in the configuration file. 2.2 Decoder decoder_app [-paramShort ParameterValue] [--paramLong ParameterValue] All decoding parameters are set by the command lines. ******************************************************************* 3. Examples of command line For SDR, using cfg\encode_RA.cfg For PG, using cfg\HDR\encode_RA_PG.cfg For HLG, using cfg\HDR\encode_RA_HLG.cfg 3.1 Random Access build\x86_windows\x64\Release\encoder_app --config cfg\encode_RA.cfg -i City_1280x720_60.yuv -w 1280 -h 720 -z 60 -p 64 -f 9 -d 8 -q 45 -o City_RA.bin -r City_RA_rec.yuv build\x86_windows\x64\Release\decoder_app -s -i City_RA.bin -o City_RA_dec.yuv 3.2 All Intra build\x86_windows\x64\Release\encoder_app --config cfg\encode_AI.cfg -i City_1280x720_60.yuv -w 1280 -h 720 -z 60 -f 9 -d 8 -q 45 -o City_AI.bin -r City_AI_rec.yuv build\x86_windows\x64\Release\decoder_app -s -i City_AI.bin -o City_AI_dec.yuv 3.3 Low Delay build\x86_windows\x64\Release\encoder_app --config cfg\encode_LD.cfg -i City_1280x720_60.yuv -w 1280 -h 720 -z 60 -f 9 -d 8 -q 45 -o City_LD.bin -r City_LD_rec.yuv build\x86_windows\x64\Release\decoder_app -s -i City_LD.bin -o City_LD_dec.yuv ******************************************************************* 4. Configuration files The default configuration files are provided in the directory "cfg". These contain explanatory comments for each parameter. If the parameter name is undefined, the program will be terminated with an error message. *******************************************************************
07-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值