ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running redhat 9 with gcc 3.2.2 along with the backwards compatibility back to gcc 2.96
I found a driver I need to install that requires gcc 2.95
If I install and older version of gcc say 2.95 then will there be compatibilty issues with 3.2.2?
Just being curious, what is your strategy for doing this. I mean did you choose different directories for each one of them and then made gcc link in each to the respective gcc version, like:
ln -sf /directory/for/gcc-3/bin/gcc-3.0 /directory/for/gcc-3/bin/gcc
ls -sf /directory/for/gcc-2.95/bin/gcc-2.95 /directory/for/gcc-2.95/bin/gcc
ls -sf /directory/for/gcc-2.95/bin/gcc-3.02 /directory/for/gcc-3.02/bin/gcc
do you change your path each time you want to change the gcc version?
Wouldn't it be easier to modify the env var CC to reflect the name of the compiler to use, instead of changing symlinks? IIRC, you can pass CC=gcc3.0.2 (or the like) to ./configure, or even just create a simple makefile for the project to compile, and put the correct compiler name.
Maybe I'm just oversymplifying it. I've never dealt with multiple compiler versions on a system.
Dump gcc 2.96. This is an unofficial version, and seems to be causing a lot of problems with C++. I saw two posts to that effect on this forum in the last couple of days.
If you need gcc-2.xx (typically for some kernel/module work on older kernels), use gcc-2.95.2 or gcc-2.95.3.
Use gcc-3.x.x if you are doing C++. It features many improvements in modern C++ features and its optimizer is superior.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.