Sunday, 3 July 2011

Howto: Compile program for 32bit On Ubuntu 64Bit

Sometimes I want to compile package or program for 32bit in my Backtrack 5 GNOME 64bit. And this post will tell you how to do like that.

1. Install required package.
    - apt-get install g++-multilib

2. Set option of configure with CFLAGS=-m32 for 32bit compiling.
    - ./configure CFLAGS=-m32

3. Now compile it.
    - make


If you want to compile c language with gcc, please try like this.gcc

No comments:

Post a Comment