How to use multiple versions of GCC


We have a new application that requires glibc 2.4 (from gcc 4.1). The machine we have runs on has gcc 3.4.6. We can not upgrade, and the application must be run on this machine.

We installed gcc 4.1, however, when it comes to compile time it is using all the includes, etc, from 3.4.6.

How do we get around this?

Any suggestions on using 4.1 for just this application?

9/17/2014 12:40:07 PM

Accepted Answer

Refer "How to install multiple versions of GCC" here in the GNU GCC FAQ.

There's also a white paper here.

1/15/2009 9:19:30 PM

Have you tried gcc-select? Otherwise, try setting the INCLUDE_PATH and LIBRARY_PATH in your shell.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow