Results 1 to 7 of 7

Thread: I cannot use Qwt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default I cannot use Qwt

    Hello, Everyone!

    I installed qwt-6.0.2:

    qmake
    mingw32-make

    With the file 'qwtconfig.pri':

    Qt Code:
    1. ################################################################
    2. # Qwt Widget Library
    3. # Copyright (C) 1997 Josef Wilgen
    4. # Copyright (C) 2002 Uwe Rathmann
    5. #
    6. # This library is free software; you can redistribute it and/or
    7. # modify it under the terms of the Qwt License, Version 1.0
    8. ################################################################
    9.  
    10. QWT_VER_MAJ = 6
    11. QWT_VER_MIN = 0
    12. QWT_VER_PAT = 2
    13. QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT}
    14.  
    15. ######################################################################
    16. # Install paths
    17. ######################################################################
    18.  
    19. QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
    20.  
    21. unix {
    22. QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
    23. }
    24.  
    25. win32 {
    26. QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION
    27. }
    28.  
    29. QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
    30. QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
    31. QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib
    32.  
    33. ######################################################################
    34. # Designer plugin
    35. ######################################################################
    36.  
    37. QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer
    38. # QWT_INSTALL_PLUGINS = $${QT_INSTALL_PREFIX}/plugins/designer
    39.  
    40. ######################################################################
    41. # Features
    42. # When building a Qwt application with qmake you might want to load
    43. # the compiler/linker flags, that are required to build a Qwt application
    44. # from qwt.prf. Therefore all you need to do is to add "CONFIG += qwt"
    45. # to your project file and take care, that qwt.prf can be found by qmake.
    46. # ( see http://doc.trolltech.com/4.7/qmake-advanced-usage.html#adding-new-configuration-features )
    47. # I recommend not to install the Qwt features together with the
    48. # Qt features, because you will have to reinstall the Qwt features,
    49. # with every Qt upgrade.
    50. ######################################################################
    51.  
    52. QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
    53. # QWT_INSTALL_FEATURES = $${QT_INSTALL_PREFIX}/features
    54.  
    55. ######################################################################
    56. # qmake internal options
    57. ######################################################################
    58.  
    59. CONFIG += qt # Also for Qtopia Core!
    60. CONFIG += warn_on
    61. CONFIG += thread
    62. CONFIG += silent
    63.  
    64. win32 {
    65. # On Windows you can't mix release and debug libraries.
    66. # The designer is built in release mode. If you like to use it
    67. # you need a release version. For your own application development you
    68. # might need a debug version.
    69. # Enable debug_and_release + build_all if you want to build both.
    70.  
    71. #CONFIG += release # release/debug/debug_and_release
    72. CONFIG += debug_and_release
    73. #CONFIG += build_all
    74. }
    75.  
    76. ######################################################################
    77. # Build the static/shared libraries.
    78. # If QwtDll is enabled, a shared library is built, otherwise
    79. # it will be a static library.
    80. ######################################################################
    81.  
    82. #QWT_CONFIG += QwtDll
    83.  
    84. ######################################################################
    85. # QwtPlot enables all classes, that are needed to use the QwtPlot
    86. # widget.
    87. ######################################################################
    88.  
    89. QWT_CONFIG += QwtPlot
    90.  
    91. ######################################################################
    92. # QwtWidgets enables all classes, that are needed to use the all other
    93. # widgets (sliders, dials, ...), beside QwtPlot.
    94. ######################################################################
    95.  
    96. QWT_CONFIG += QwtWidgets
    97.  
    98. ######################################################################
    99. # If you want to display svg images on the plot canvas, or
    100. # export a plot to a SVG document
    101. ######################################################################
    102.  
    103. QWT_CONFIG += QwtSvg
    104.  
    105. ######################################################################
    106. # You can use the MathML renderer of the Qt solutions package to
    107. # enable MathML support in Qwt. Because of license implications
    108. # the ( modified ) code of the MML Widget solution is included and
    109. # linked together with the QwtMathMLTextEngine into an own library.
    110. # To use it you will have to add "CONFIG += qwtmathml"
    111. # to your qmake project file.
    112. ######################################################################
    113.  
    114. QWT_CONFIG += QwtMathML
    115.  
    116. ######################################################################
    117. # If you want to build the Qwt designer plugin,
    118. # enable the line below.
    119. # Otherwise you have to build it from the designer directory.
    120. ######################################################################
    121.  
    122. QWT_CONFIG += QwtDesigner
    123.  
    124. ######################################################################
    125. # If you want to auto build the examples, enable the line below
    126. # Otherwise you have to build them from the examples directory.
    127. ######################################################################
    128.  
    129. # QWT_CONFIG += QwtExamples
    130.  
    131. ######################################################################
    132. # When Qt has been built as framework qmake ( qtAddLibrary ) wants
    133. # to link frameworks instead of regular libs
    134. ######################################################################
    135.  
    136. macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
    137.  
    138. QWT_CONFIG += QwtFramework
    139. }
    To copy to clipboard, switch view to plain text mode 

    I went in the directory 'c:\qt\qwt-6.0.2\examples\bode\'

    And I changed the file 'bode.pro':

    Qt Code:
    1. ################################################################
    2. # Qwt Widget Library
    3. # Copyright (C) 1997 Josef Wilgen
    4. # Copyright (C) 2002 Uwe Rathmann
    5. #
    6. # This library is free software; you can redistribute it and/or
    7. # modify it under the terms of the Qwt License, Version 1.0
    8. ################################################################
    9.  
    10. include( $${PWD}/../examples.pri )
    11.  
    12. TARGET = bode
    13.  
    14. HEADERS = \
    15. mainwindow.h \
    16. plot.h \
    17. complexnumber.h \
    18. pixmaps.h
    19.  
    20. SOURCES = \
    21. plot.cpp \
    22. mainwindow.cpp \
    23. main.cpp
    24.  
    25. QWT_LOCATION = c:\qt\qwt-6.0.2
    26. INCLUDEPATH += $${QWT_LOCATION}/src
    27. LIBS = -L$${QWT_LOCATION}/lib \
    28. -lqwt
    29.  
    30. if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
    31. win32:LIBS = $$member(LIBS, 0) \
    32. $$member(LIBS, 1)d
    33. }
    To copy to clipboard, switch view to plain text mode 

    I wrote two commands:

    qmake -o Makefile bode.pro
    mingw32-make

    I saw the file with the extension '.o'. But I did not see the file 'bode.exe'

    Output:
    Qt Code:
    1. C:\qt\qwt-6.0.2\examples\bode>qmake -o Makefile bode.pro
    2. WARNING: c:\qt\qwt-6.0.2\examples\bode\bode.pro:25: Unescaped backslashes are deprecated.
    3. WARNING: c:\qt\qwt-6.0.2\examples\bode\bode.pro:25: Unescaped backslashes are deprecated.
    4. WARNING: c:\qt\qwt-6.0.2\examples\bode\bode.pro:25: Unescaped backslashes are deprecated.
    5.  
    6. C:\qt\qwt-6.0.2\examples\bode>mingw32-make
    7. C:/MinGW/bin/mingw32-make.EXE -f Makefile.Debug all
    8. mingw32-make.EXE[1]: Entering directory `C:/qt/qwt-6.0.2/examples/bode'
    9. compiling plot.cpp
    10. compiling mainwindow.cpp
    11. compiling main.cpp
    12. moc mainwindow.h
    13. compiling moc/moc_mainwindow.cpp
    14. moc plot.h
    15. compiling moc/moc_plot.cpp
    16. linking ..\bin\bode.exe
    17. mingw32-make.EXE[1]: Leaving directory `C:/qt/qwt-6.0.2/examples/bode'
    18. C:/MinGW/bin/mingw32-make.EXE -f Makefile.Release all
    19. mingw32-make.EXE[1]: Entering directory `C:/qt/qwt-6.0.2/examples/bode'
    20. compiling plot.cpp
    21. compiling mainwindow.cpp
    22. compiling main.cpp
    23. compiling moc/moc_mainwindow.cpp
    24. compiling moc/moc_plot.cpp
    25. linking ..\bin\bode.exe
    26. mingw32-make.EXE[1]: Leaving directory `C:/qt/qwt-6.0.2/examples/bode'
    To copy to clipboard, switch view to plain text mode 

    Thanks!

    Ivan

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

    Default Re: I cannot use Qwt

    Quote Originally Posted by 8Observer8 View Post
    I installed qwt-6.0.2:
    All you did is to build Qwt, it is not installed !.

    A proper installation always ends with:
    Qt Code:
    1. mingw32-make install
    To copy to clipboard, switch view to plain text mode 
    The project files for building the Qwt examples are completely different to the project files of an application. Better throw away what you did so far.


    • When you want to check the examples use the project files as they are. All you need to do is to set the PATH variable, so that the lib and examples/bin directories ( read the line "linking" in the output you have posted ) are found.
    • For building an application configure qmake, so that it finds qwt.prf where you have Qwt installed: see https://qt-project.org/doc/qt-4.8/qm...ation-features.

      I prefer to use option 2 using the QMAKEFEATURES property:
      Qt Code:
      1. qmake -set QMAKEFEATURES "C:/Qwt-6.0/features:..."
      To copy to clipboard, switch view to plain text mode 

      Then simply add the following line to your project file:
      Qt Code:
      1. CONFIG += qwt
      To copy to clipboard, switch view to plain text mode 


    When it is a new project I recommend to start with Qwt 6.1.

    Uwe

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

    8Observer8 (8th January 2013)

  4. #3
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: I cannot use Qwt

    Thank you very much!

    Yes, I found the file 'bode.exe' in the directory 'C:\qt\qwt-6.0.2\examples\bin'

    What will be happened when I will install the Qwt? I can get the file '.exe' without the installation of the Qwt (without: mingw32-make install)

    Your reply is very useful for me. I am studying the documentation of the qmake now.

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

    Default Re: I cannot use Qwt

    Quote Originally Posted by 8Observer8 View Post
    What will be happened when I will install the Qwt?
    No reason for being afraid of something - your system won't be modified in any way beside that Qwt copies some files in a proper way below the directory you have configured in qwtconfig.pri. After removing the directory your system is in the same state as before.

    Running into problems because of not doing this step makes absolutely no sense.

    Uwe

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

    8Observer8 (8th January 2013)

  7. #5
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: I cannot use Qwt

    Thanks!

    Ivan

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.