I would like to build ROOT with QT. First of all I read that in order to have the qtroot classes someone can just build root with --enable-qt option when configure.
The root I set like:
git clone root.cern.ch/git/root.git root_all
git checkout -t origin/v5-34-00-patches
./configure --all
I am trying to do so but I always get
Checking for Qt/qglobal.h … no
when configure so I don’t see enabled support for QT. The root compiles correctly though…
I have installed QT 5.2 from the web installer and I have 10.9 OSX. I have QT in a directory
and I have put the bin to the path. If I execute qmake -v I get
QMake version 3.0
Using Qt version 5.2.0 in /Users/gio/Software/Qt/5.2.0/clang_64/lib
I have also the $QTDIR = /Users/gio/Software/Qt/5.2.0/clang_64
So I guess it’s ok.
Dear George,
The current ROOT “configure” can not detect the recent Qt installation correctly the way you described
qmake -v
QMake version 3.0
Using Qt version 5.2.0 in /Users/gio/Software/Qt/5.2.0/clang_64/lib It looks for ‘Qt/qglobal.h’ . The recent Qt version doesn’t contains this file and ROOT configure fails. I hope it can be fixed.
Mean time I would suggest to install ROOT with no --enable-qt flag and then complement it with QtROOT the way the page root.bnl.gov/QtRoot/How2Install4 … complement describe
make[1]: *** No rule to make target `TQtRootCommand.ui', needed by `.ui/ui_TQtRootCommand.h'. Stop.
make: *** [sub-qtgui-make_first-ordered] Error 2
[/quote] The patch below solves the issue your reported. However, the code can not be compiled against of Qt 5.2. There are some obsolete flags to be removed / replaced. I did not commit any correction yet. Stay tuned. Thank you.
#include ("$$ROOTCINTFOUND")
LIBS += $$system(${ROOTSYS}/bin/root-config --glibs)
-# remove the posible refs to itself
+# remove the possible refs to itself
LIBS -= -lQtRootGui
Thanks George[/quote]Sorry, not yet. I had been moving from one job to another one and had to surrender all my laptops and desktops and close server accnts. I’ll try to catch up over weekend (Hope my son will loan me his Mac . Thank you for your patience. Cheers, Valeri
Hi all.
I begging a pardon for the long delay. I got a new job (the good news ) and I have to commute 2.5 hours one way ( 5 hours/day total) that leave me no room to do anything useful for the community (that the bad news, sorry ).
I was able to preare the “short version” of QtRoot for you to try (Has no time to test yet ).
Try as follows:
1) Install ROOT from CERN with qt disabled.
2)[code]cd QtRoot
setenv QTROOTSYSDIR pwd/qtrootsys # Use the dedicated directory
# to keep ROOT and QtRoot separately
setenv QTROOTSYSDIR $ROOTSYS # This will merge ROOT and QtRoot
# libraries and header files
mkdir -p $QTROOTSYSDIR
svn checkout svn://svn.code.sf.net/p/qtroot/code/trunk qtRoot
cd qtRoot
qmake qtRootShort.pro
make
make install
[/code]This version should allow you to create TQtWidget.
I’ll be away of all means of electronic communication for a week. Please, do not expect my response before 26th of March. I’ll become more productive as soon as I resolve my “commute” issues. Good luck Valeri.
Thanks for this. Although TQtWidget compiles the compilation does not finish.
I get:
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
make[1]: *** [../libGQt.1.0.0.dylib] Error 1
make: *** [sub-qt-make_first-ordered] Error 2
Any ideas ?
Thanks,
George[/quote]The message comes from *your" Qt distribution. Can you build some "Qt “Hello Word” with no “ROOT” at all ? (using Qt qmake / make )
You may try to “cd qtRoot/qt: make distclean; qmake qt.pro; make; make install” to build just one “qt” package from QtRoot package to learn things faster.
Thanks for the reply. I am able to build a simple qt program.
What you suggested doesn’t work since I get an error already on qmake:
Project MESSAGE: PLEASE make the symbolic link (ln -sf /Users/gio/Software/QtRoot/qtrootsys/lib ) by hand!!!
Thanks for the reply. I am able to build a simple qt program.
George[/quote]Does your “simple” program calls some cout /cerr / stl / iostream/ printf ?
If then answer is ‘no’, can you add it to see whether you still can build your “simple qt program”.
Can you send (attach) me your entire Qt project for your “simple” program?
I have updated my SVN repository to take in account some Qt 5.2 features.
I was able to compile, build QtRoot as well as some examples on my MacOS 10.7.5 with no problem as described by sourceforge.net/p/qtroot/wiki/Home/ .
I had no time to make all examples Qt 5.2 compliant. However I think it is not so important.
I would recommend to update your current working version from SVN.
I got your code. However, I did not find what I wanted to see, namely I need to see the qmake “project file rather the Makefile. Can you do that? (see sourceforge.net/p/qtroot/code/H … elloCanvas for example). Please do not send me the “”.git” send the the tar.gz working directory I start from. By some reason your message was sent to my “obsolete” e-mail address . Please, attach your tar with our project.pro the forum. This way the other people will be able to try it too.