Child pages
  • RHEL/CentOS 64에서 32bit app compile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

gcc 에 -m2 m32 옵션을 주면 32bit 로 컴파일할 수 있다. (64bit OS 의 경우 -m64 옵션이 켜진다)

컴파일시에 다음과 같은 에러가 발생하면 

Code Block
$ gcc -m32 pad.c
In file included from /usr/include/features.h:385,
                 from /usr/include/stdio.h:28,
                 from pad.c:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

...