To install 32-bit libraries on a 64-bit linux system
Install:$ apt-get install ia32-libs
To install 32-bit libraries for development
$ apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 $ apt-get install lib32asound2 lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev $ apt-get install g++-multilibYou may need this too, or it may be a virtual package already provided:
$ apt-get install ia32-libs-gtkYou may need a symlink, which g++-multilib may set up for you automatically:
$ ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.soUpdate LD_LIBRARY_PATH
You may need to add the LD path, for example like this:
$ edit /etc/profile ... add these lines... LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib32:/usr/lib32 export LD_LIBRARY_PATHTo compile with gcc
To compile things with gcc, you need to add the flag -m32 like this:
gcc -m32 myfile.c