# multiple version of gcc



## aperdemak (Jun 5, 2017)

Hello, i installed gcc47 and gcc49 from pkg install and in order to compile with gcc49 i made a symlink in /usr/local/bin which goes to gcc49. But when I run the program I get :


```
/usr/local/lib/gcc47/libstdc++.so.6: version GLIBCXX_3.4.20 required by MyProgram
```

I would like to run the program with the lib of gcc49, if someone could help me I would be gratefull.
Thanks in advance.


----------



## Mirko Cetkovic (Jul 18, 2017)

To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc49


----------

