how can i change gcc 4.3.2 to gcc 4.2.4

Asked by ash

hi am using wubi 8.10.515 and have code orginally compiled on gcc version 4.2.4, after doing sudo-apt get install build-essential, the only the version installed is 4.3.2. when i try to make,
iostream.h No such file or directory.
then a number of cout was not declared in this scope messages.

how can i change from current gcc version to 4.2.4? or is there a way around this. please advise.
with regards

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-defaults Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cross (strokemeister) said :
#1

Well, you should tell us what are you trying to build (if it's not private). I think that not matter with which gcc version are you using right now because iostream.h is a header (library). have you tried; sudo apt-get install g++ ? that library makes me think it's a C++ script.

Revision history for this message
juancarlospaco (juancarlospaco) said :
#2

Open Synaptics, search for " gcc ", on the menu "Package" ---->Force Version...
(maybe you have to remove it first to enable this option)

gcc 4.2.4 is in the oficial Repos too,
I give you my " Package Download Script " made with Synaptics for Gcc 4.2.4 on Intrepid ibex 8.10

#!/bin/sh
wget -c http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.2/gcc-4.2-base_4.2.4-3ubuntu4_i386.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.2/cpp-4.2_4.2.4-3ubuntu4_i386.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.2/gcc-4.2_4.2.4-3ubuntu4_i386.deb

Can you help with this problem?

Provide an answer of your own, or ask ash for more information if necessary.

To post a message you must log in.