简体   繁体   English

查询C / C ++代码的64位移植

[英]Query on 64bit porting of C/C++ code

After compiling the code with Visual studio 2008 64 bit compiler for an existing 32 bit app.exe(enterprise app) without using /Wp64 compilation switch, we resolved all the Level 1/2/3 warnings that we encountered with proper datatype changes and then ran the application with AllocationPreference registry key set. 在不使用/Wp64编译开关的情况下,使用Visual Studio 2008 64位编译器为现有的32位app.exe(企业应用)编译代码后,我们解决了在数据类型正确更改后遇到的所有Level 1/2/3警告,然后使用AllocationPreference注册表项集运行该应用程序。

Application crashes with registry key set, and application runs fine, if this registry key is removed. 如果删除了注册表项,则应用程序将崩溃并设置了注册表项,并且应用程序可以正常运行。

How do i approach in this situation? 在这种情况下我该如何处理? Do you think using /Wp64 will add any value? 您认为使用/Wp64是否会增加任何价值?

You approach this problem by looking at the line of code which crashes. 通过查看崩溃的代码行来解决此问题。 Pretty much like you'd approach any other crash, really. 真的,就像您要处理其他任何崩溃一样。 "Solving every crash takes time" you say. 您说:“解决每次车祸都需要时间。” Well, each crash is a bug. 好吧,每次崩溃都是一个错误。 Think about what that says about your application. 考虑一下有关您的应用程序的内容。 How many of the bugs cause crashes, how many corrupt data silently? 有多少个bug导致崩溃,有多少个无声破坏数据?

/Wp64 isn't a bad idea, on 64 bits builds. /Wp64并不是一个坏主意,在64位版本上。 But getting your code base in order is more important. 但是,按顺序整理代码库更为重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM