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

That depends on which variant of toolchain you’re currently using. Both DWARF and SEH variants (which come starting from GCC 4.8.0) are only single-target. You can see it yourself by inspecting the directory structure of their distributions, i.e. they contain only the libraries with either 64- or 32-bit addressing, but not both. On the other … Read more

Installing Oracle 32-bit Client on Windows Server Already Running 64-bit Oracle Database Server

Here is an instruction how to install 32-bit and 64-bit Oracle Client on one machine. Follow the instruction, then it should work. Assumptions: Oracle Home is called OraClient11g_home1, Client Version is 11gR2 Download and install Oracle x86 Client, for example into C:\Oracle\11.2\Client_x86 Download and install Oracle x64 Client into different folder, for example to C:\Oracle\11.2\Client_x64 … Read more

SetWindowsHookEx failing in .NET 4.0 on 32-bit machine with “module not found”?

Yup, I think you understand what’s going on. SetWindowsHookEx() requires a valid module handle, and verifies it, but it doesn’t actually use it when you set a low-level hook. You just need a valid handle, it doesn’t matter which specific one. Calling LoadLibrary(“user32.dll”) is a good way to get a handle, that DLL will always … Read more

How to Compile 32-bit Apps on 64-bit Ubuntu?

This is known to work on Ubuntu 16.04 through 22.04: sudo apt install gcc-multilib g++-multilib Then a minimal hello world: main.c #include <stdio.h> int main(void) { puts(“hello world”); return 0; } compiles without warning with: gcc -m32 -ggdb3 -O0 -pedantic-errors -std=c89 \ -Wall -Wextra -pedantic -o main.out main.c And ./main.out outputs: hello world And: file … Read more

How to make Android apps which support both 32-bit and 64-bit architecture?

According to an official email sent by the Google Play Team, the action required is: If you haven’t yet, we encourage you to begin work for the 64-bit requirement as soon as possible. Many apps are written entirely in non-native code (e.g. the Java programming language or Kotlin) and will not need code changes. Please … Read more

Exec format error 32-bit executable Windows Subsystem for Linux?

QEMU and binfmt support light the way 🙂 https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520 After reading that the WSLInterop between WSL and Windows processes used binfmt, I was tinkering with QEMU to try some ARM development, and incidentally discovered how to get 32-bit support working. Edit: requires “Fall Creators Update”, 1709, build 16299 or newer Install qemu and binfmt config: … Read more