# Error happend while linking vtkProbeOpenGLVersion.cxx.o

**URL:** https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572
**Category:** Support
**Created:** [January 6, 2022, 2:50am UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572 "2022-01-06T02:50:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![imgoofy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/imgoofy/32/4501_2.png) [@imgoofy](https://discourse.vtk.org/u/imgoofy)
#### Post date: [January 6, 2022, 2:50am UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/1 "2022-01-06T02:50:33Z")

</div>

I’m trying to build VTK in my Linux machine, but I got below linking error. How could I fix it?

ld: CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: undefined reference to symbo ‘\_ZStlsISt11char\_traintsIcEERSt13basic\_ostreamIcT\_ES5\_PKc@@GLIBCXX\_3.4’

The glibc version in my machine is 2.12. Is the version too old to support VTK 9.1?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [January 6, 2022, 3:24am UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/2 "2022-01-06T03:24:55Z")

</div>

The `glibc` version doesn’t matter at all. `GLIBCXX_` is the prefix for `libstdc++` and GCC 3.4 is definitely too old to get even this far…so you have that.

After fixing the typo (`traints`), it demangles to:

```auto
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)

```

which would be an odd symbol to be missing. What is the link line for this error?

---

<div class="post-metadata">

### Author: ![imgoofy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/imgoofy/32/4501_2.png) [@imgoofy](https://discourse.vtk.org/u/imgoofy)
#### Post date: [January 6, 2022, 3:35am UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/3 "2022-01-06T03:35:28Z")

</div>

The link line is:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/9/9e5edd85e29a0013427b83fac5e1b243489c1786.jpeg)

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [January 7, 2022, 7:42pm UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/4 "2022-01-07T19:42:57Z")

</div>

GLibc 2.12 is from 2010: [Glibc Timeline - glibc wiki](https://sourceware.org/glibc/wiki/Glibc%20Timeline). That’s 12 years. Upgrading is strongly recommended.

---

<div class="post-metadata">

### Author: ![imgoofy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/imgoofy/32/4501_2.png) [@imgoofy](https://discourse.vtk.org/u/imgoofy)
#### Post date: [January 10, 2022, 9:01am UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/5 "2022-01-10T09:01:07Z")

</div>

I’d love to upgrade, but I have to stay with 2.12. 😂

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [January 10, 2022, 3:28pm UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/6 "2022-01-10T15:28:42Z")

</div>

Maybe you could try VTK 8 or older.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [January 22, 2022, 4:10pm UTC](https://discourse.vtk.org/t/error-happend-while-linking-vtkprobeopenglversion-cxx-o/7572/7 "2022-01-22T16:10:24Z")

</div>

It would seem to me that the problem is that you have `gcc` linking a C++ program. If you run that command manually with `g++` instead, does it work? If so, figuring out why `gcc` is used to link a C++ program is the thing to investigate.
