우분투 32bit , 63bit 컴파일

2013/02/02 00:46

기본적으로 64비트 우분투에서 32비트 컴파일 하면...

gcc -m32 -o 32bittest test.c
실행하면 아래와 같은 오류 메세지 ㅠㅠ

In file included from /usr/include/stdio.h:28:0,
>             from test.c:1:
> /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
> compilation terminated.
그러므로 우리는

$ sudo apt-get install libc6-dev-i386
설치해주면 잘 컴파일 된다 ^^;