32bit-64bit

Compilation on 64-bit system for 32 bit system - compatibility

梦想的初衷 提交于 2019-12-09 17:48:31
问题 i have a 64-bit machine with 64-bit OS... how can i compile programs with Visual Studio 2010 so that they work on 32-bit system if i install 32-bit OS on my 64-bit machine than i thinks it won't be a problem 回答1: If you are talking about .NET applications simply verify that you are targeting x86 in the properties of your project (this is the default setting) or Any CPU: 回答2: This is a nice property of just-in-time compiled code. It runs just as well on a 32-bit machine (using the x86 jitter)

Why is the 64-bit MSBuild loading 32-bit extensions?

允我心安 提交于 2019-12-09 15:44:19
问题 I'm attempting to build a project using MSBuild (v4.0) on a 64-bit machine. For some reason, MSBuild is attempting to load a 32-bit extension, and I cannot figure out why. I've reduced the problem to the smallest set in order to demonstrate the issue. Using the following MSBuild project file: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <Target Name="test"> <Message Text="bin path: $(MSBuildBinPath)" /> <Message Text="extensions path: $

How to convert 32-bit compiled binary to 64-bit [closed]

为君一笑 提交于 2019-12-09 15:32:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Background: We have acquired a software product that builds to a 32-bit Windows application in Visual Studio. We wish to port this application to 64-bit. A mission-critical component of this code is a black-box static library (.a file) originally built using gFortran by a third

pop Instruction not supported in 64-bit mode using NASM?

流过昼夜 提交于 2019-12-09 14:42:07
问题 I'm working on a more indepth hello world using NASM following this tutorial (section 4). This tutorial essentially teaches you how to handle command line input. This is the snippet of the code in question: section .text global _start _start: pop ebx ; arg count pop ebx ; arg[0] the program name pop ebx ; arg[1-n] the remainder of the args ; must each be indiviually popped The code errors out during compilation with error: instruction not supported in 64-bit mode referring to the 3 pop

How can I tell whether my GCC is compiling 64bit by default?

这一生的挚爱 提交于 2019-12-09 14:38:30
问题 is there any way to know whether GCC is compiling 32 or 64bit code by default? my GCC version is 4.1.2. my os kernel version is x86_64. thanks. 回答1: Type gcc -v . Amongst other things, it will tell you the target platform. For instance, I get: Target: x86_64-redhat-linux 回答2: As @Oli said, the configuration should tell you, but it's possible to screw with that after the fact. For belt and braces, simply compile something, and then use file to examine the output file. 来源: https://stackoverflow

Math behind 4GB limit on 32 bit systems

百般思念 提交于 2019-12-09 09:51:45
问题 I have a very fundamental question relating to 32 bit memory addresses. My understanding is that 2^32 is the maximum number of possible memory addresses on a 32 bit system. Where I am confused is how we go from this number to the alleged 4GB limit. In my research I have seen some people do this: 2^32 = 4,294,967,296 bytes 4,294,967,296 / (1,024 * 1,024) = ~4 GB First, where does this (1,024 * 1,024) come from? Second, correct me if I am wrong, but 4,294,967,296 is labeled as bytes because a

int vs size_t on 64bit

孤人 提交于 2019-12-09 08:05:59
问题 Porting code from 32bit to 64bit. Lots of places with int len = strlen(pstr); These all generate warnings now because strlen() returns size_t which is 64bit and int is still 32bit. So I've been replacing them with size_t len = strlen(pstr); But I just realized that this is not safe, as size_t is unsigned and it can be treated as signed by the code (I actually ran into one case where it caused a problem, thank you, unit tests!). Blindly casting strlen return to (int) feels dirty. Or maybe it

32-bit DLL “may not compatible” on Server 2008, but works on Server 2003

痴心易碎 提交于 2019-12-09 07:53:38
问题 We have a project that compiles to a 32-bit COM DLL and to a 64-bit COM DLL (the same one from my earlier question). When I register both on my Windows 7 machine, both register successfully. When I register both on a Windows Server 2003 machine, both register successfully. But when I try to register the DLLs on a Windows Server 2008 R2 standard SP1 machine, the 64-bit DLL registers successfully, but the 32-bit DLL fails with the message (sic): The module ""%1"" may not compatible with the

How to enable 32-bit applications mode in IIS 6 and IIS 7 using c#

久未见 提交于 2019-12-09 06:47:32
问题 I want to change Enable32BitAppOnWin64 property using C#. I know that the way of interacting with IIS 6 and IIS 7 are different. but I need the solution for both versions. 回答1: There are a few differences in programmatically managing IIS 6 and IIS 7. IIS 6 is programmatically managed using the DirectoryEntry class and the metabase database API. IIS 7 is managed using the Microsoft.Web.Administration assembly and the ServerManager class. Furthermore IIS 6 is not able to run both 64 bit and 32

Using 32-bit library in 64-bit C++ program

匆匆过客 提交于 2019-12-08 17:36:11
问题 Is there any way how use an old 32-bit static library *.a in a 64-bit system. The is no chance to obtain a source code of this old library to compile it again. I also do not want to use -m32 in gcc, because the program use many 64bit libraries. Thanks. 回答1: That depends entirely on the platform on which you're running. OS X on PowerPC, for example, that would "Just Work". On x86 platforms, you can't link a 32-bit library into a 64-bit executable. If you really need to use that library, you'll