Issues related to the use of a 64-bit vs a 32-bit architecture including portability issues.
Questions tagged [32bit-64bit]
2621 questions
31
votes
4 answers
__int64 on a 32-Bit machine?
I just tried something in MSVC 2010 on my 32-bit machine here and found out that I can use __int64 in my programs - which actually work!
How is that possible?

koa
- 319
- 1
- 3
- 3
31
votes
2 answers
What's an alternative to GWL_USERDATA for storing an object pointer?
In the Windows applications I work on, we have a custom framework that sits directly above Win32 (don't ask). When we create a window, our normal practice is to put this in the window's user data area via SetWindowLong(hwnd, GWL_USERDATA, this),…

Benjamin Pollack
- 27,594
- 16
- 81
- 105
31
votes
4 answers
Windows command to tell whether a .dll file is 32 bit or 64 bit?
I'm looking for a command in windows cmd to tell me if a certain dll file is 32 bit or 64 bit
Is there something like this in windows ?

becks
- 2,656
- 8
- 35
- 64
30
votes
4 answers
what does macosx-version-min imply?
When I pass compiler flag -mmacosx-version-min=10.5, what does it mean? I think it implies the result binary is x86, not ppc, but is it 32 bits or 64 bits? I'm compiling on snow leopard, so default output binary is 64 bits. I'm not passing…

Quincy
- 1,923
- 5
- 27
- 37
30
votes
5 answers
Is Visual Studio 2010 WebDev WebServer (Cassini) 64-bit compatible?
I'm now developing on Visual Studio 2008 on a 64-bit OS (Windows Server 2008 64-bit).
While the apps I write are 64-bit capable, as is IIS7, the built-in ASP.NET Development Server (aka Cassini aka WebDev.Webserver.exe) runs as 32-bit.
This brings…

David Boike
- 18,545
- 7
- 59
- 94
30
votes
3 answers
printf with sizeof on 32 vs 64 platforms: how do I handle format code in platform independent manner?
I have some code that prints the amount of memory used by the program. The line is similar to this:
printf("The about of RAM used is %u", anIntVariable*sizeof(double) );
where anIntVariable is an int variable for the number of elements of the…

SO Stinks
- 3,258
- 4
- 32
- 37
29
votes
3 answers
Access x86 COM from x64 .NET
I have an x64 server which, since my libraries are compiled to AnyCPU, run under x64. We are needing to access a COM component which is registered under x86. I don't know enough about COM and my google searches are leading me nowhere.
Question:…

Craig Wilson
- 12,174
- 3
- 41
- 45
28
votes
8 answers
Relocation R_X86_64_32S against `.rodata' ... While compiling on 64-bit platform
So I've been coding something on 32-bit and yesterday I needed to build a dll and I had a couple of problems with that. Anyway I solved them here.
Unfortunately even if I thought that everything was working after all I found that wasn't the case…

Mare
- 943
- 3
- 11
- 18
28
votes
4 answers
Option to force either 32-bit or 64-bit build with cmake
I would like to offer a way that always builds my target as a 32-bit or always as 64-bit executable executable with cmake independent of the host system (Adding the "-m32" or "-m64" flag for gcc, not sure yet what to do for other compilers).
I can…

Flogo
- 1,673
- 4
- 20
- 33
26
votes
1 answer
C++ int vs long long in 64 bit machine
My computer has 64 bit processor and when I look for sizeof(int), sizeof(long), and sizeof(long long), it turns out that int and long are 32 bits, and long long is 64 bit. I researched the reason, and it appears that popular assumption telling that…

UserRR
- 399
- 1
- 3
- 16
26
votes
5 answers
What's bad about shifting a 32-bit variable 32 bits?
I recently picked up a copy of Applied Cryptography by Bruce Schneier and it's been a good read. I now understand how several algorithms outlined in the book work, and I'd like to start implementing a few of them in C.
One thing that many of the…

masseyc
- 313
- 1
- 4
- 8
26
votes
5 answers
Phpstorm superslow - 282.8% CPU usage
After working for over 5 years with Netbeans I wanted to give a try with Phpstorm suggested by a friend.
I downloaded a fresh copy of Phpstorm and imported in the IDE a fresh project. The result is TERRIBLE!
Phpstorm is terribly slow during…

Marcos Lamba
- 479
- 2
- 7
- 10
26
votes
1 answer
Can I use 32bit dll or exe in 64bit python?
When I use CDLL to call 32bit dll in 32bit python, it works well.
But unfortunatelly in my 64bit win7 os only installs 64bit python, when calling it turns: it is not a effective win32 app!
Can I use 32bit dll or exe in 64bit python? Or I have to…

hjhnju
- 265
- 1
- 3
- 6
26
votes
3 answers
How do I use a 32-bit ODBC driver on 64-bit Server 2008 when the installer doesn't create a standard DSN?
I ran into an issue with some third party software that we use to track software license usage in our computer labs. We recently migrated the app to 64-bit Server 2008 after receiving assurances from the company that it was compatible and running…

tvanfosson
- 524,688
- 99
- 697
- 795
25
votes
3 answers
Why is fPIC absolutely necessary on 64 and not on 32bit platforms?
I recently received a:
...relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
error while trying to compile a program as a shared library.
Now the solution to this is not too difficult…

Bojan B
- 393
- 3
- 9