Results 1 to 9 of 9

Thread: Building application with Qwt 6.1.0

  1. #1
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Building application with Qwt 6.1.0

    I'm sorry to post what is probably the 1000th post about the subject but I did follow the instructions and I'm still stuck.

    I've installed Qwt 6.1.0 (qmake, nmake, nmake install). I've also set permanently the QMAKEFEATURES to the features dir and it correctly shows the features folder path if I do "-query" on that variable.

    However even with "CONFIG += qwt", the line
    Qt Code:
    1. include "qwt_plot.h"
    To copy to clipboard, switch view to plain text mode 
    gives me the error of "cannot open include file".

    I've done it now in the command prompt of Qt 5.1. (qmake, nmake).

    Could anyone please help me find the problem?

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building application with Qwt 6.1.0

    Disable "CONFIG += silent" in your project file ( if set ) and have a look at the commands, when compiling your files. Do you see the path to the Qwt include directory there ?

    Uwe

  3. #3
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building application with Qwt 6.1.0

    Thanks for answering Uwe.

    I don't have -silent set, but I'm not sure where I should be seeing the path.

    My .pro file has

    Qt Code:
    1. QT += core gui xml script declarative network
    2. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    3.  
    4. TARGET = MyAppCore
    5. TEMPLATE = app
    6.  
    7. CONFIG += qwt
    To copy to clipboard, switch view to plain text mode 
    (I skipped the sources/headers/forms part)

    I'm running qMake and building via Qt Creator (2.7.2).

    When I go to the project properties I see:
    "effective qMake call":
    qmake.exe D:\MyAppCore\MyAppCore.pro -r -spec win32-msvc2010 "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"

    After that it runs a make step with jom.exe.

    My output starts with:

    Starting: "C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe"
    C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtDe clarative" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtWi dgets" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtNe twork" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtSc ript" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtXm l" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtGu i" -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\include\QtCo re" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\mkspecs\win3 2-msvc2010" -Fodebug\ @C:\Users\myusername\AppData\Local\Temp\myproject. obj.5900.405.jom

    I really don't see the Qwt folder here.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building application with Qwt 6.1.0

    Quote Originally Posted by frankiefrank View Post
    I really don't see the Qwt folder here.
    Yes, indicating that "CONFIG += qwt" didn't work because your qmake is not configured properly ( you can prove this easily by replacing "CONFIG += qwt" by "include ( C:\Qwt-6.1.0\features\qwt.prf )".

    You wrote, that you have set QMAKEFEATURES - what exactly is the output of "qmake -query QMAKEFEATURES" and are you sure, that this is the same qmake version as it is used by the creator ?

    Uwe

  5. #5
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building application with Qwt 6.1.0

    That's helpful. I see that the Qt Versions tab lists the qmake from the "bin" folder. I went with cmd.exe to that path, and it still looks ok.

    C:\Qt\Qt5.1.0\5.1.0\msvc2010_opengl\bin>qmake -query QMAKEFEATURES
    C:\Qwt-6.1.0\features

    Update: I'm doing this from the Visual Studio 2008 command line prompt. QMAKE with the above settings, the query seems ok but "nmake" doesn't contain any Qwt paths.
    Last edited by frankiefrank; 5th August 2013 at 14:44.

  6. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building application with Qwt 6.1.0

    What happens, when you replace "CONFIG += qwt" by the include statement above ?

    Uwe

  7. #7
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building application with Qwt 6.1.0

    I get this error:

    moc_MyPlot.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)

  8. #8
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,253
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building application with Qwt 6.1.0

    As "CONFIG += qwt" is only another way for including the installed qwt.prf you definitely have a problem with your QMAKEFEATURES setting. As everything you wrote in this thread looks o.k. to me something has to be wrong with what you have not written so far.
    Concerning the link error: how does a compile and the link commands look like ?

    Uwe

  9. The following user says thank you to Uwe for this useful post:

    frankiefrank (6th August 2013)

  10. #9
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building application with Qwt 6.1.0

    Thanks for your reply and help so far!

    I don't really know how else to check the QMAKEFEATURES. If I run the Qt 5.1 command prompt and try qmake -query qmakefeatures I get the correct path.

    I now think I'm ok, but I did several things:

    I took the advice from another post where you left a compliment on:
    http://www.qtcentre.org/threads/5378...3-(Win7-64bit)

    And added the Qwt-6.1.0\lib folder to my PATH variable. I also added the QMAKEFEATURES setting to the qmake "additional arguments" in Qt Creator. I then managed to build.

    I'm not sure where the mess is coming from, hope I'm ok now.

Similar Threads

  1. Building Distributed Application
    By Ma7moud El-Naggar in forum Qt Programming
    Replies: 4
    Last Post: 4th November 2010, 20:08
  2. Replies: 0
    Last Post: 6th October 2010, 16:02
  3. Building application with static Qt libraries
    By nedlab in forum Installation and Deployment
    Replies: 1
    Last Post: 28th December 2008, 21:07
  4. Replies: 1
    Last Post: 19th November 2007, 02:34
  5. Replies: 0
    Last Post: 9th May 2007, 11:35

Tags for this Thread

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.