# Fail to to compile TMatrixT\<TComplex\>

**URL:** <https://root-forum.cern.ch/t/fail-to-to-compile-tmatrixt-tcomplex/48237>\
**Category:** ROOT\
**Tags:** cling\
**Created:** [January 1, 2022, 2:04am UTC](https://root-forum.cern.ch/t/fail-to-to-compile-tmatrixt-tcomplex/48237 "2022-01-01T02:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![biden](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/a6a055/32.png) [@biden](https://root-forum.cern.ch/u/biden)\
**Post date:** [January 1, 2022, 2:04am UTC](https://root-forum.cern.ch/t/fail-to-to-compile-tmatrixt-tcomplex/48237/1 "2022-01-01T02:04:57Z")

</div>

Hi, I met some trouble when compiling the following code:

#include \<TMatrixT.h\>  
#include \<TComplex.h\>  
typedef TMatrixT\<TComplex\> TMatC;

int main()  
{  
TMatC mat;  
return 0;  
}

then complie:  
: g++ $(root-config --cflags) $(root-config --libs) test.cxx -o test  
got lots of undefined symbols during link.

any solutions ? thank you.

\_ROOT Version: 6.24/06  
\_Platform: ubuntu 20.40 LTS  
\_Compiler: gcc 9.3.0

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [January 1, 2022, 3:21pm UTC](https://root-forum.cern.ch/t/fail-to-to-compile-tmatrixt-tcomplex/48237/2 "2022-01-01T15:21:21Z")

</div>

Hello,

I believe this is a duplicate of:

> [@Fail to compile TMatrixT\<TComplex\>](https://root-forum.cern.ch/t/fail-to-compile-tmatrixt-tcomplex/48232):
>
> #include \<TMatrixT.h\> #include \<TComplex.h\> typedef TMatrixT\<TComplex\> TMatC; int main() { TMatC mat; return 0; } then complie: : g++ $(root-config --cflags) $(root-config --libs) test.cxx -o test got lots of undefined symbols during link. any solutions ? thank you. \_ROOT Version: 6.24/06 \_Platform: ubuntu 20.40 LTS \_Compiler: gcc 9.3.0

Please check the answer you got in that other post.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 15, 2022, 3:22pm UTC](https://root-forum.cern.ch/t/fail-to-to-compile-tmatrixt-tcomplex/48237/3 "2022-01-15T15:22:16Z")

</div>

Closed on January 15, 2022, 3:22pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
