I followed the instructions from @jokerdino here in askubuntu
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
But to get a successful compilation I've had to:
- export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
- sudo ln -s /usr/lib/x86_64-linux-gnu/crti.o /usr/lib64/crti.o
- sudo ln -s /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib64/crtn.o
Which I understand effectively breaks the Ubuntu multilib model. So how do I compile the correct way and remove the links? Because now I'd like to cross-compile for 32 bits. (Using Precise)