I have gcc 5.3.0 and I want to downgrade it to 4.8.5 because I have downloaded a code that is implemented on gcc 4.8.5 and it is not working on my gcc
Asked
Active
Viewed 1,530 times
-8
-
3Why not just uninstall the current version and install the version that you require – Ed Heal Jul 24 '16 at 16:40
-
4Why not just install the versions that you need, then for each project use the relevant version. But better, fix the code. – Cheers and hth. - Alf Jul 24 '16 at 16:41
-
4You can install in a different directory? Or, you know, actually *fix* the errors in the code you have? – Some programmer dude Jul 24 '16 at 16:41
-
2Hard to give you directions when all you tell us is that "it is not working". If you would be more specific perhaps someone can tell you what to do to workaround the problem, since I doubt there's code that compiles in 4.8.5 but not in 5.3.0. – Havenard Jul 24 '16 at 16:46
-
Is this C or C++ code. As I'm aware the dialect default for C changed between those versions. You can use the older version by specifying `-std=gnu90`. – Dunes Jul 24 '16 at 16:54
2 Answers
0
1) uninstall your current compiler.
2) install the wanted compiler.
Alternatively; fix the code to work with the newer compiler (better in the long term).
Alternative alternative; install both compilers "side by side" and just use the one you want.

Jesper Juhl
- 30,449
- 3
- 47
- 70
-
-
I'm not the one downvoting, but I think it may be due to at all answering this kind of question. – Cheers and hth. - Alf Jul 24 '16 at 16:48
-
You may be right. I don't mind downvotes when I'm wrong. But I do mind them when there's no *reason* given. – Jesper Juhl Jul 24 '16 at 16:51
-
The downvotes are probably because neither downgrading gcc or changing the code should be a solution. The newer gcc version should be perfectly capable of compiling his code considering it works on a previous version, we just have to figure out why it is not. He is probably just doing something wrong, but we will never know since he didn't provide any information. – Havenard Jul 24 '16 at 16:59
-
While I generally agree, newer compilers tend to find/flag more bugs. So it's not entirely unheard of that a newer compiler will refuse (broken) code that an older one allowed. – Jesper Juhl Jul 24 '16 at 19:06
0
Remove current folder, where is gcc installed and install it again into same folder.

Přemysl Šťastný
- 1,676
- 2
- 18
- 39