# Two g++ compilers active simultaneously.  Help me understand

**URL:** <https://forums.suse.com/t/two-g-compilers-active-simultaneously-help-me-understand/24870>\
**Category:** SLES Configure-Administer\
**Created:** [December 10, 2013, 6:07pm UTC](https://forums.suse.com/t/two-g-compilers-active-simultaneously-help-me-understand/24870 "2013-12-10T18:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skwysham](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@skwysham](https://forums.suse.com/u/skwysham)\
**Post date:** [December 10, 2013, 6:07pm UTC](https://forums.suse.com/t/two-g-compilers-active-simultaneously-help-me-understand/24870/1 "2013-12-10T18:07:48Z")

</div>

SUSE 10 SP1 (yeah, old as the hills). I need g++ 3.3 and 4.1.2 active simultaneosly in order to migrate an application. I understand that having more than 1 compiler is “not possible.” Please help me understand the reason behind this. Is it because of the rpm packaging, only, or is something more subtle at work? I’ve built gcc 4.1.2 with custom build options, but it seems that I should be able to rebuild just the rpms with edited directories, e.g. into /usr/local/bin instead of /usr/bin.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [December 10, 2013, 6:41pm UTC](https://forums.suse.com/t/two-g-compilers-active-simultaneously-help-me-understand/24870/2 "2013-12-10T18:41:12Z")

</div>

> [@](#):
>
> On Tue 10 Dec 2013 04:14:01 PM CST, skwysham wrote:
> 
> SUSE 10 SP1 (yeah, old as the hills). I need g++ 3.3 and 4.1.2 active  
> simultaneosly in order to migrate an application. I understand that  
> having more than 1 compiler is “not possible.” Please help me  
> understand the reason behind this. Is it because of the rpm packaging,  
> only, or is something more subtle at work? I’ve built gcc 4.1.2 with  
> custom build options, but it seems that I should be able to rebuild just  
> the rpms with edited directories, e.g. into /usr/local/bin instead of  
> /usr/bin.

Hi  
You can have multiple compilers installed, you just need to call them  
when building… for example;

```auto
export CC=/usr/bin/gcc43
export CXX=/usr/bin/gcc43-++
```

Then your Makefile should take care of it…

gcc and g++ are just symlinks to the installed compiler, you can always  
change those links, but better to leave defaults and export as required.

–  
Cheers Malcolm Â°Â¿Â° SUSE Knowledge Partner (Linux Counter #276890)  
SLED 11 SP3 (x86\_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!
