Results 1 to 15 of 15

Thread: How to set QMAKESPEC ??

  1. #1
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default How to set QMAKESPEC ??

    hi all,
    i am new to Linux ( i have installed federo core 5 and Qt frm qt-x11-opensource-src-4.2.2).
    now when i m trying to compile n execute the t1 sample given with Qt, its giving the following error :
    [root@localhost t1]# qmake -project
    [root@localhost t1]# qmake
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:2: Unknown replace function: quote
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:3: Unknown replace function: quote
    Failure to read QMAKESPEC conf file /mkspecs/linux-g++/qmake.conf.
    Error processing project file: /root/qt-x11-opensource-src-4.2.2/examples/tutorial/t1/t1.pro

    Please help me, and tell me the commands to do it. i have logged in the "root" login.
    please tell me tht do i need to install any compiler (like mingw) to use with it?
    thanks
    Last edited by Shuchi Agrawal; 13th March 2007 at 08:49.
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  2. #2
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Quote Originally Posted by Shuchi Agrawal View Post
    hi all,
    i am new to Linux ( i have installed federo core 5 and Qt frm qt-x11-opensource-src-4.2.2).
    now when i m trying to compile n execute the t1 sample given with Qt, its giving the following error :
    [root@localhost t1]# qmake -project
    [root@localhost t1]# qmake
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:2: Unknown replace function: quote
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:3: Unknown replace function: quote
    Failure to read QMAKESPEC conf file /mkspecs/linux-g++/qmake.conf.
    Error processing project file: /root/qt-x11-opensource-src-4.2.2/examples/tutorial/t1/t1.pro

    Please help me, and tell me the commands to do it. i have logged in the "root" login.
    please tell me tht do i need to install any compiler (like mingw) to use with it?
    thanks

    Seems to be same question...
    Please refer this http://lists.trolltech.com/qt-intere...ad00698-0.html

  3. #3
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set QMAKESPEC ??

    thanks. but i have aleady checked this link. the main problem is i am not getting how to set QMAKESPEC to linux-g++.
    So i wil be greatful to you if u can help me in this.
    Thanks
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  4. #4
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Quote Originally Posted by Shuchi Agrawal View Post
    thanks. but i have aleady checked this link. the main problem is i am not getting how to set QMAKESPEC to linux-g++.
    So i wil be greatful to you if u can help me in this.
    Thanks
    I'm not too a linux expert but I think you can use export QMAKESPECS=PATH WHAT YOU WANT TO SET.
    Hope this helps.

  5. #5
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Quote Originally Posted by vermarajeev View Post
    I'm not too a linux expert but I think you can use export QMAKESPECS=PATH WHAT YOU WANT TO SET.
    Hope this helps.
    Hmm I think this will help you

    Set QMAKESPEC to the spec that is most suitable for your platform.
    export QMAKESPEC=$QTDIR/mkspecs/linux-g++

  6. #6
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set QMAKESPEC ??

    after doin this i m getting the error :
    [root@localhost t1]# qmake /root/qt-x11-opensource-src-4.2.2/.qmake.cache:2: Unknown replace function: quote
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:3: Unknown replace function: quote
    Project LOAD(): Feature qt_config cannot be found.
    [root@localhost t1]#


    please help me in this. Thanks
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  7. #7
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Quote Originally Posted by Shuchi Agrawal View Post
    after doin this i m getting the error :
    [root@localhost t1]# qmake /root/qt-x11-opensource-src-4.2.2/.qmake.cache:2: Unknown replace function: quote
    /root/qt-x11-opensource-src-4.2.2/.qmake.cache:3: Unknown replace function: quote
    Project LOAD(): Feature qt_config cannot be found.
    [root@localhost t1]#


    please help me in this. Thanks
    Hi try out this

    'ln -s mkspec/features features'

    But I'm not sure. If you get the errors again. Please let us know what steps you followed. IF possible type env on command prompt and let us know what is QTDIR and QMAKESPEC's path.

    Thanks

  8. #8
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set QMAKESPEC ??

    now qmake is working but when i give "make" i get the following error fot the "t1" tutorial given with Qt
    [root@localhost t1]# qmake -project
    [root@localhost t1]# qmake
    [root@localhost t1]# make
    make: Nothing to be done for `first'.
    [root@localhost t1]#
    can you tel me whts 'first' as the code in .cpp is
    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    3. int main(int argc, char *argv[])
    4. { QApplication app(argc, argv);
    5. QPushButton hello("Hello world!");
    6. hello.resize(100, 30);
    7. hello.show();
    8. return app.exec(); }
    To copy to clipboard, switch view to plain text mode 

    when i m deleting the "first: all" fm in between the makefile then its successfully executing n getting as follows
    [root@localhost t1]# make
    g++ -c -pipe -g -O2 -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SO URCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/lin ux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../includ e/QtGui -I../../../include/QtGui -I../../../include -I. -I.moc/release-shared -I .uic/release-shared -o .obj/release-shared/main.o main.cpp
    g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -Wl,-rpath,/usr/local/Trolltech /Qt-4.2.2/lib -o t1 .obj/release-shared/main.o -L/root/qt-x11-opensource-src- 4.2.2/lib -lQtGui -L/root/qt-x11-opensource-src-4.2.2/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXe xt -lX11 -lQtCore -lz -lm -lglib-2.0 -ldl -lpthread
    (test -z "" || cd "" ; targ=`basename t1`; objcopy --only-keep-debug "$targ" "$t arg.debug" && objcopy --strip-debug "$targ" && objcopy --add-gnu-debuglink="$tar g.debug" "$targ" && chmod -x "$targ.debug" ) ;
    [root@localhost t1]#
    but the "t1" and "t1.debug" generated are of executable type but not getting executed.
    Last edited by Shuchi Agrawal; 13th March 2007 at 11:26.
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  9. #9
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Please rerun qmake. Also let me know what steps you followed.

    If possible use something like this

    Qt Code:
    1. qmake -project
    2. qmake -o makefile project.pro
    3. make clean
    4. make
    To copy to clipboard, switch view to plain text mode 

    Hope this helps

  10. #10
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set QMAKESPEC ??

    When i m clicking the "t1" executable, nothing happens. can u tell me why???
    i m following the steps u told successfully
    [root@localhost t1]# qmake -project
    [root@localhost t1]# qmake -o makefile t1.pro
    [root@localhost t1]# make clean
    rm -f qmake_image_collection.cpp
    rm -f .obj/release-shared/main.o
    rm -f *~ core *.core
    [root@localhost t1]# make
    g++ -c -pipe -g -O2 -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../include/QtGui -I../../../include/QtGui -I../../../include -I. -I.moc/release-shared -I.uic/release-shared -o .obj/release-shared/main.o main.cpp
    g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -o t1 .obj/release-shared/main.o -L/root/qt-x11-opensource-src-4.2.2/lib -lQtGui -L/root/qt-x11-opensource-src-4.2.2/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -lglib-2.0 -ldl -lpthread
    (test -z "" || cd "" ; targ=`basename t1`; objcopy --only-keep-debug "$targ" "$targ.debug" && objcopy --strip-debug "$targ" && objcopy --add-gnu-debuglink="$targ.debug" "$targ" && chmod -x "$targ.debug" ) ;
    [root@localhost t1]#
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  11. #11
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Go to the path where the executable is and type ./t1. It should work.

  12. #12
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: How to set QMAKESPEC ??

    Thanks a lot. i got the command but still....
    [root@localhost t1]# ./t1
    ./t1: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
    [root@localhost t1]#
    it gives the above error on executing the exe.
    one thing i noticed is when i run "make" then it gives as :
    [root@localhost t1]# make
    g++ -c -pipe -g -O2 -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../include/QtGui -I../../../include/QtGui -I../../../include -I. -I.moc/release-shared -I.uic/release-shared -o .obj/release-shared/main.o main.cpp
    g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -o t1 .obj/release-shared/main.o -L/root/qt-x11-opensource-src-4.2.2/lib -lQtGui -L/root/qt-x11-opensource-src-4.2.2/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -lglib-2.0 -ldl -lpthread
    (test -z "" || cd "" ; targ=`basename t1`; objcopy --only-keep-debug "$targ" "$targ.debug" && objcopy --strip-debug "$targ" && objcopy --add-gnu-debuglink="$targ.debug" "$targ" && chmod -x "$targ.debug" ) ;
    [root@localhost t1]#

    can u tel me why it is taking the path which i have bolded above and how can i correct it?
    there is no such folder "trolltech" in /usr/local
    i have installed Qt in root.but i think g++ compiler has other settings of qt installation. m i right?
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

  13. #13
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??

    Right use something like this

    Qt Code:
    1. export QTDIR="PATH WHERE qt is installed" (example: /usr/lib/qt4)
    2. export PATH=$QTDIR/bin:$PATH
    To copy to clipboard, switch view to plain text mode 

  14. #14
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QMAKESPEC ??


  15. #15
    Join Date
    Dec 2006
    Posts
    103
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set QMAKESPEC ??

    Thanks :-)
    its working now :-)
    i didnt followed "install make"
    Thanks a lot
    I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
    now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.

Similar Threads

  1. QMAKESPEC has not been set, so configuration cannot be deduced
    By Rekha in forum Installation and Deployment
    Replies: 11
    Last Post: 6th November 2012, 18:48
  2. what is this QMAKESPEC and hw to set it?
    By neomax in forum Qt Programming
    Replies: 2
    Last Post: 13th March 2007, 07:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.