[] In eclips project explorer,Add extra "-m32" for both compiler and linker
Project->Properties --> C/C++ Build --> Settings
-->Tool settings
-->gcc c compiler --> command: gcc -m32
-->gcc c linker --> command: gcc -m32
[] extra Required Packages: add some as you need
Installing the following packages enabled standard C/C++ library calls to work. If other libraries are used within the code, additional 32-bit packages might have to be installed. Installation via Linux Mint, based on Ubuntu, is via the standard apt-get install command.
$sudo apt-get install g++-multilib lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
$sudo apt-get install lib32asound2 lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
This might also be required if the code still does not compile:
$sudo apt-get install ia32-libs-gtk
After adding the suggested package libc6-dbg, the error still occurred. Installing the 32-bit version of the package fixed the error:
$sudo apt-get install libc6-dbg:i386
[]rember clean project befor first time compile new bitwidth-archecture
標籤: 32bit on 64bit, build, c, compile, eclipse