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

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


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

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 (1.4 MB)

Thank you very much.
Jessica

Fix problems reported by:

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

At least:

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

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

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.

The error message is clear: 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.

@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

cplusplus.com → double_t

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