Compiling and linking a 32 bit application on Debian 64 bit
问题 I am currently trying to compile and link a 32 bit application on my Debian 64 bit, but it fails at link time. The command I'm using (in my Makefile) to compile is: gcc -Os -m32 -Wall -g -c $< -o $@ This seems to work. Then I link with the following command: gcc -m32 -lcurses $^ -o $@ This fails and gives the following errors: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libcurses.so when searching for -lcurses /usr/bin/ld: skipping incompatible /usr/lib/gcc