Results 1 to 2 of 2

Thread: How to build QWT-5.2 with Visual Studio 2005

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default How to build QWT-5.2 with Visual Studio 2005

    No offense, but frankly the instructions in the INSTALL file are horrible.

    So to help others with the same difficulties I had, here is how to build and install QWT-5.2 with Visual Studio 2005

    1. Make sure that Qt\2009.03\bin is in your PATH environment settings. %QTDIR%\bin\ was already in my path, but didn't work, so I also added C:\Qt\2009.03\qt\bin . IF you get an error about qmake not found, then the path didn't take
    2. Edit qwt-5.2/qwtconfig.pri to build both release and debug, and you probably also want it not to build a dll
    3. Open Start / All Programs / Microsoft Visual Studio 2005 / Visual Studio Tools / Visual Studio 2005 Command Prompt
    4. cd to qwt-5.2
    5. Type qmake qwt.pro
    6. Type nmake
    7. The static libraries will be in qwt-5.2\lib . Link these into your Visual Studio project
    8. Header files are in qwt-5.2\src . Add this path to your Visual Studio project
    9. Copy qwt-5.2\designer\plugins\designer\qwt_designer_plugin5 .dll to Qt\2009.03\qt\plugins\designer
    10. Copy qwt-5.2\designer\plugins\designer\qwt_designer_plugin5 .exp to Qt\2009.03\qt\plugins\designer
    11. Copy qwt-5.2\designer\plugins\designer\qwt_designer_plugin5 .lib to Qt\2009.03\qt\plugins\designer
    12. Run Qt Designer
    13. Click Help / About Plugins
    14. Make sure qwt_designer_plugin5.dll is listed there


    Here's the modified qwtconfig.pri

    Qt Code:
    1. ######################################################################
    2. # Install paths
    3. ######################################################################
    4.  
    5. VER_MAJ = 5
    6. VER_MIN = 2
    7. VER_PAT = 1
    8. VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
    9.  
    10. unix {
    11. INSTALLBASE = /usr/local/qwt-$$VERSION-svn
    12. }
    13.  
    14. win32 {
    15. INSTALLBASE = C:/Qwt-$$VERSION-svn
    16. }
    17.  
    18. target.path = $$INSTALLBASE/lib
    19. headers.path = $$INSTALLBASE/include
    20. doc.path = $$INSTALLBASE/doc
    21.  
    22. ######################################################################
    23. # qmake internal options
    24. ######################################################################
    25.  
    26. CONFIG += qt # Also for Qtopia Core!
    27. CONFIG += warn_on
    28. CONFIG += thread
    29.  
    30. ######################################################################
    31. # release/debug mode
    32. # If you want to build both DEBUG_SUFFIX and RELEASE_SUFFIX
    33. # have to differ to avoid, that they overwrite each other.
    34. ######################################################################
    35.  
    36. VVERSION = $$[QT_VERSION]
    37. isEmpty(VVERSION) {
    38.  
    39. # Qt 3
    40. CONFIG += debug # release/debug
    41. }
    42. else {
    43. # Qt 4
    44. win32 {
    45. # On Windows you can't mix release and debug libraries.
    46. # The designer is built in release mode. If you like to use it
    47. # you need a release version. For your own application development you
    48. # might need a debug version.
    49. # Enable debug_and_release + build_all if you want to build both.
    50.  
    51. #CONFIG += debug # release/debug/debug_and_release
    52. CONFIG += debug_and_release
    53. CONFIG += build_all
    54. }
    55. else {
    56. CONFIG += debug # release/debug
    57. }
    58. }
    59.  
    60. ######################################################################
    61. # If you want to have different names for the debug and release
    62. # versions you can add a suffix rule below.
    63. ######################################################################
    64.  
    65. DEBUG_SUFFIX =
    66. RELEASE_SUFFIX =
    67.  
    68. win32 {
    69. DEBUG_SUFFIX = d
    70. }
    71.  
    72. ######################################################################
    73. # Build the static/shared libraries.
    74. # If QwtDll is enabled, a shared library is built, otherwise
    75. # it will be a static library.
    76. ######################################################################
    77.  
    78. #CONFIG += QwtDll
    79.  
    80. ######################################################################
    81. # QwtPlot enables all classes, that are needed to use the QwtPlot
    82. # widget.
    83. ######################################################################
    84.  
    85. CONFIG += QwtPlot
    86.  
    87. ######################################################################
    88. # QwtWidgets enables all classes, that are needed to use the all other
    89. # widgets (sliders, dials, ...), beside QwtPlot.
    90. ######################################################################
    91.  
    92. CONFIG += QwtWidgets
    93.  
    94. ######################################################################
    95. # If you want to display svg imageson the plot canvas, enable the
    96. # line below. Note that Qwt needs the svg+xml, when enabling
    97. # QwtSVGItem.
    98. ######################################################################
    99.  
    100. #CONFIG += QwtSVGItem
    101.  
    102. ######################################################################
    103. # If you have a commercial license you can use the MathML renderer
    104. # of the Qt solutions package to enable MathML support in Qwt.
    105. # So if you want this, copy qtmmlwidget.h + qtmmlwidget.cpp to
    106. # textengines/mathml and enable the line below.
    107. ######################################################################
    108.  
    109. #CONFIG += QwtMathML
    110.  
    111. ######################################################################
    112. # If you want to build the Qwt designer plugin,
    113. # enable the line below.
    114. # Otherwise you have to build it from the designer directory.
    115. ######################################################################
    116.  
    117. CONFIG += QwtDesigner
    118.  
    119. ######################################################################
    120. # If you want to auto build the examples, enable the line below
    121. # Otherwise you have to build them from the examples directory.
    122. ######################################################################
    123.  
    124. #CONFIG += QwtExamples
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to rakkar for this useful post:

    GimpMaster (19th October 2009)

  3. #2
    Join Date
    Aug 2008
    Location
    Texas, USA
    Posts
    44
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to build QWT-5.2 with Visual Studio 2005

    This worked great. The only thing I would add is to type

    nmake install

    This will create a folder in windows under:

    c:\Qwt-XXX-svn

    that has the

    \includes and
    \lib

    also it takes care of coping the plugins to the designer plugin folder.

Similar Threads

  1. Replies: 7
    Last Post: 16th November 2009, 15:40
  2. QWT examples in Visual Studio 2005
    By Roelof in forum Qwt
    Replies: 8
    Last Post: 14th August 2009, 12:07
  3. qwt and visual studio 2005
    By stefan in forum Qwt
    Replies: 4
    Last Post: 30th September 2008, 11:25
  4. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  5. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17

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.