Qt issue: TQtWidget undefined reference

Dear rooters,

I’m developing an application to display histograms, in the context of the ATLAS TDAQ monitoring working group. The current tdaq release uses the root version 5.18.00f.

The application has the following code:

void TabImpl::view(){ (...) TQtWidget *MyWidget= new TQtWidget(0,"test",0,1); delete MyWidget; }

No matter what constructor I use, I got the following compilation error on lxplus (with tdaq-02-00-00):

g++ -Wl,-rpath,/afs/cern.ch/sw/lcg/external/qt/4.4.2/slc4_ia32_gcc34/lib -o bin/node2 build/MainWindowImpl.o build/main.o build/TabImpl.o build/PrefImpl.o build/Configuration.o build/ConPrefImpl.o build/NodeConThr.o build/moc_MainWindowImpl.o build/moc_TabImpl.o build/moc_PrefImpl.o build/moc_ConPrefImpl.o build/moc_NodeConThr.o -L/afs/cern.ch/sw/lcg/external/qt/4.4.2/slc4_ia32_gcc34/lib -L/afs/cern.ch/sw/lcg/external/root/5.18.00f/slc4_ia32_gcc34/root/lib -L../i686-slc4-gcc34-opt -lnode2 -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -rdynamic -lGQt -lQtRoot -lQt3Support -L/afs/cern.ch/sw/lcg/external/qt/4.4.2/slc4_ia32_gcc34/lib -lQtSql -pthread -pthread -pthread -pthread -lQtXml -pthread -pthread -pthread -pthread -L/usr/X11R6/lib -pthread -pthread -pthread -pthread -pthread -pthread -lQtNetwork -pthread -pthread -pthread -pthread -pthread -pthread -lQtGui -pthread -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread build/TabImpl.o(.text+0x1cf9): In function `TabImpl::view()': : undefined reference to `TQtWidget::TQtWidget(QWidget*, char const*, QFlags<Qt::WindowType>, bool)'

I’ve read on the forum that the qt4 support on this version is not poor, but it should at least compile.
Can you see what’s missing? Probably is a silly thing…

Please post back if you need more info about the environment or other features.

It seems to me TDAQ keeps its own version of QtROOT in TDAQ repository.
Do you use it ? May be you got some clash between TDAQ version of QtRoot and one from ROOT 5.18

[quote=“rneves”]I’ve read on the forum that the qt4 support on this version is not poor, but it should at least compile.
Can you see what’s missing? Probably is a silly thing…
[/quote] I do not see any COMPILATION error. You did not show us how you compiled your code. I am guessing your code was compiled. Please, tell us, how you did it.

I am really confused with your command options though

-pthread -pthread -pthread -pthread . . . -pthread -pthread -pthread -pthread . . . -pthread -pthread -pthread -pthread -pthread -pthread -. . . -pthread -pthread -pthread -pthread -pthread -pthread -lQtGui -pthread -. . . . -pthread -pthread . . . . -pthread -lgthread-2.0 . . . -lpthread Why did you mention pthread 25 :open_mouth: times

Hi all,

did anything ever come out of this thread, since I am having the same problem?

Cheers,

Erik

P.S. Indeed it is only a link error, the compilation works fine

P.S. I am using qt 4.4.2 and root 5.18 on slc4_ia32_gcc345

[quote=“emb”]…did anything ever come out of this thread, since I am having the same problem? [/quote]Which one?

[quote=“emb”]P.S. Indeed it is only a link error, the compilation works fine[/quote]I would appreciate we may leave this thread “as is” and start the new one if needed. Can you describe your issue from the scratch?

[quote=“emb”]P.S. I am using qt 4.4.2 and root 5.18 on slc4_ia32_gcc345 [/quote]First, PLEASE, read the topic: :bulb: root.cern.ch/phpBB2/viewtopic.ph … highlight= carefully
Please, pay your attention to the clause:

[quote]… Did I understand the page
twiki.cern.ch/twiki/bin/view/SP … #Externals
correctly
ROOT 5.22a from LCG 56 is built against of Qt 4.4.2.
and ROOT 5.18.00d from LCG 55a is built against of Qt 3.3.8
lcgsoft.cern.ch/index.py?page=cf … ew&cfg=55a
I.e. the current LCG56 is the first version of ROOT built against Qt 4.x . . .[/quote] See lcgsoft.cern.ch/index.py?page=cf … ew&cfg=55c

[quote]ROOT 5.18.00f
. . .
qt 3.3.8 [/quote]LCG area doesnot provide any ready-to-eat combination. To be able to use QtRoot against of Qt 4.x AND ROOT 5.18 you have to re-build QtRoot yourself (see root.bnl.gov/QtRoot/How2Install4 … complement )