# Root 5.34 error: Error in \<TApplication::TApplication\>: only one instance of TApplication allowed

**URL:** <https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723>\
**Category:** Newbie\
**Created:** [April 23, 2019, 7:45am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723 "2019-04-23T07:45:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![babintsev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@babintsev](https://root-forum.cern.ch/u/babintsev)\
**Post date:** [April 23, 2019, 7:45am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/1 "2019-04-23T07:45:43Z")

</div>

Hello,  
I have problem with root-5.34 : I cannot compile any program here !?

I use UBUNTU-14, 32 bits  
uname -a  
Linux phpc55 3.13.0-168-generic #218-Ubuntu SMP Thu Mar 14 16:55:19 UTC 2019 i686 i686 i686 GNU/Linux

## Example: I have the program:

cat test2.cxx  
// /////////////////////////////////////////////////////

//int  
//main(int argc, char \*\*argv)  
int  
main()  
{ //-----------------------------  
// the start point of the program  
//---------------------------------

return 0;

} // main()

* * *

when I do compilation - it works , BUT during running  
I see the error:

root [0] .L test2.cxx+  
Info in TUnixSystem::ACLiC: creating shared library /home/babintsev/tmp/tt/./test2\_cxx.so  
root [1] main()  
Error in TApplication::TApplication: only one instance of TApplication allowed

* * *

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [April 23, 2019, 8:05am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/2 "2019-04-23T08:05:18Z")

</div>

Hi,

You cannot start a TApplication from the ROOT prompt. You should run the program outside the ROOT prompt, directly from the ubuntu command line

Lorenzo

---

<div class="post-metadata">

**Author:** ![Jessica.PQ](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jessica.PQ](https://root-forum.cern.ch/u/Jessica.PQ)\
**Post date:** [November 5, 2021, 7:11am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/3 "2021-11-05T07:11:06Z")

</div>

Hi all,

I have some problems with my code “plot\_th23dcp.C” and I attached with folder. I don’t know why I can run this code in root 6 but can’t run it in root5. Please help me. [Error\_root5.zip](https://root-forum.cern.ch/uploads/short-url/joESrQ6BNzv0m2c7jXvODAJYLdu.zip) (1.4 MB)

Thank you very much.  
Jessica

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 5, 2021, 7:22am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/4 "2021-11-05T07:22:56Z")

</div>

Fix problems reported by:

```bash
`root-config --cxx --cflags` -O2 -Wall -Wextra -c plot_th23dcp.C

```

At least:

```cpp
#include "TH3.h"
using std::cout;
using std::endl;

```

---

<div class="post-metadata">

**Author:** ![Jessica.PQ](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jessica.PQ](https://root-forum.cern.ch/u/Jessica.PQ)\
**Post date:** [November 6, 2021, 5:18am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/5 "2021-11-06T05:18:06Z")

</div>

Thank you. But I can’t run this code yet.  
I met this error:

```auto
Error: Symbol ,chisq[NPOINT] is not defined in current scope plot_th23dcp.C:121:
Error: Symbol ,chisq[NPOINT] is not defined in current scope plot_th23dcp.C:121:
Error: Invalid type 'double_t' in declaration of 'dcptest' plot_th23dcp.C:121:
Error: Symbol double_t dcptest[NPOINT],chisq[NPOINT] is not defined in current scope plot_th23dcp.C:121:
***Interpreter error recovered***
root [1] 

```

I hope you can try to run and let me know how to edit them.

Jessica.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 6, 2021, 10:52am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/6 "2021-11-06T10:52:58Z")

</div>

The error message is clear: invalid type ‘ **double\_t** ’.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 8, 2021, 10:05am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/7 "2021-11-08T10:05:37Z")

</div>

> [@Jessica.PQ](#):
>
> `Error: Invalid type 'double_t'`

As @Wile_E_Coyote pointed `double_t` is not a valid type. You should use `Double_t` (uppercase `D`) or simply the standard C/C++ type `double`.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 8, 2021, 10:21am UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/8 "2021-11-08T10:21:53Z")

</div>

@couet Strictly speaking, it’s the CINT interpreter in ROOT 5 which does not understand this type, even when ROOT 5 is built with “`-std=c++11`”.

[cppreference.com → C → Numerics → Common mathematical functions → float\_t, double\_t](https://en.cppreference.com/w/c/numeric/math/float_t)

[cplusplus.com → double\_t](https://www.cplusplus.com/reference/cmath/double_t/)

---

<div class="post-metadata">

**Author:** ![Jessica.PQ](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jessica.PQ](https://root-forum.cern.ch/u/Jessica.PQ)\
**Post date:** [November 15, 2021, 4:45pm UTC](https://root-forum.cern.ch/t/root-5-34-error-error-in-tapplication-tapplication-only-one-instance-of-tapplication-allowed/33723/9 "2021-11-15T16:45:42Z")

</div>

Hi all.  
Sorry I can’t run this code yet by root5. Can you try go through them and edit errors. Thanks all.  
Jessica.
