dala dala - 1 year ago 112
Linux Question

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake

Is it possible to compile a project in 32-bit with

on a 64-bit system? It probably is, but how do I do it?

When I tried it the "ignorant" way, without setting any parameters/flags/etc, just setting
to find the linked libraries in
it seems to ignore it and only look in subdirectories named lib64.

caf caf
Answer Source
export CFLAGS=-m32