Questions tagged [32bit-64bit]

Issues related to the use of a 64-bit vs a 32-bit architecture including portability issues.

2621 questions
40
votes
12 answers

BadImageFormatException when loading 32 bit DLL, target is x86

I have a DLL (FreeType) which is certainly 32-bit (header: IMAGE_FILE_MACHINE_I386). I want to use it from C# code, using DllImport. Target of my application is x86, IntPtr.Size is 4, process is 32-bit. But I get BadImageFormatException (Exception…
Coder
  • 483
  • 1
  • 4
  • 7
39
votes
6 answers

What are the pros and cons of running IIS as 32bit vs 64bit on a 64bit OS?

Possibly better suited for "Rack Overflow", but from a developer's point of view, what are the advantages and disadvantages of running IIS (serving both legacy classic ASP and .NET) as a 32bit process instead of a 64bit process on a 64bit windows…
entropi
  • 529
  • 1
  • 5
  • 7
38
votes
3 answers

What causes System.BadImageFormatException when constructing System.Data.SQLite.SQLiteConnection

I've broken the code down to the smallest possible statement: Dim cn As System.Data.SQLite.SQLiteConnection And I get the following error when calling the code from a WinForm applicaiton: System.BadImageFormatException: Could not load file or…
Tim Murphy
  • 4,892
  • 4
  • 40
  • 48
37
votes
4 answers

Which command to use for checking whether python is 64bit or 32bit

I am not able to find any command to check if my python is compiled for 32bit system or 64bit system. I tried python and it only tells the version Also when I go to python download site they have one version of python for linux but two versions…
Mirage
  • 30,868
  • 62
  • 166
  • 261
37
votes
7 answers

How do I force Python to be 32-bit on Snow Leopard and other 32-bit/64-bit questions

When I run the following from a bash shell on my Mac: $ file /usr/bin/python I get the following three lines: /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable…
Bialecki
  • 30,061
  • 36
  • 87
  • 109
37
votes
5 answers

Android studio cannot find aapt

Hi I am having trouble compiling, I get this error: Gradle: Execution failed for task ':ElectronicComponentInventorySearch:mergeDebugResources'. java.io.IOException: Cannot run program "/opt/android-studio/sdk/build-tools/android- 4.2.2/aapt":…
omegacore
  • 1,712
  • 2
  • 12
  • 16
35
votes
2 answers

When should -m32 option of gcc be used?

I am writing a program which if I compile on a Suse 10 32-bit system without adding the -m32 option and execute it on Suse 10 64-bit, it works fine. In this case, is it not required for me to add the -m32 option? Can we execute programs built on…
Jay
  • 24,173
  • 25
  • 93
  • 141
35
votes
1 answer

How do I compile and link a 32-bit Windows executable using mingw-w64

I am using Ubuntu 13.04 and installed mingw-w64 using apt-get install mingw-w64. I can compile and link a working 64-bit version of my program with the following command: x86_64-w64-mingw32-g++ code.cpp -o app.exe Which generates a 64-bit app.exe…
user103935
  • 460
  • 1
  • 4
  • 9
34
votes
12 answers

How should I handle "cast from ‘void*’ to ‘int’ loses precision" when compiling 32-bit code on 64-bit machine?

I have a package that compiles and works fine on a 32-bit machine. I am now trying to get it to compile on a 64-bit machine and find the following error- error: cast from ‘void*’ to ‘int’ loses precision Is there a compiler flag to suppress these…
badkya
  • 687
  • 3
  • 8
  • 13
33
votes
8 answers

As a programmer, what do I need to worry about when moving to 64-bit windows?

Most of my recent programming has been on 32-bit Windows using C/C++/C#/VB6 . Lately, my customers are asking if my code will run on 64-bit Windows. I'm wondering what legacy features I might be using that will break on 64-bit Windows? What are some…
jm.
  • 23,422
  • 22
  • 79
  • 93
33
votes
6 answers

64 bit version issue in react-native android app by google play store

According to https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html: In August 2019, Play store will require that new apps and app updates with native libraries provide 64-bit versions in addition to their…
neomib
  • 3,503
  • 4
  • 17
  • 27
32
votes
15 answers

Processor, OS : 32bit, 64 bit

I am new to programming and come from a non-CS background (no formal degree). I mostly program winforms using C#. I am confused about 32 bit and 64 bit.... I mean, have heard about 32 bit OS, 32 bit processor and based on which a program can have…
Sandbox
  • 7,910
  • 11
  • 53
  • 67
32
votes
6 answers

Running vbscript from batch file

I just need to write a simple batch file just to run a vbscript. Both the vbscript and the batch file are in the same folder and is in the SysWOW64 directory as the vbscript can only be execute in that directory. Currently my batch file is as…
user918197
  • 1,129
  • 6
  • 17
  • 29
31
votes
2 answers

Using intptr_t instead of void*?

Is it a good idea to use intptr_t as a general-purpose storage (to hold pointers and integer values) instead of void*? (As seen here: http://www.crystalspace3d.org/docs/online/manual/Api1_005f0-64_002dBit-Portability-Changes.html) For what I've…
Gepard
  • 499
  • 1
  • 4
  • 7
31
votes
7 answers

Use 32-bit jni libraries on 64-bit android

I've tried running an application using a native library on the Nexus 9. The application exits with an error message: java.lang.UnsatisfiedLinkError: dlopen failed: "lib_xyz.so" is 32-bit instead of 64-bit Is there any known workaround for this…
G B
  • 2,951
  • 2
  • 28
  • 50