Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [SOLVED] QWT 6.0 library in QT
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QWT 6.0 library in QT

Scheduled Pinned Locked Moved 3rd Party Software
9 Posts 3 Posters 11.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam
    wrote on last edited by
    #1

    Hi,
    I have downloaded QWT 6.0 from "svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-6.0
    ":http://qwt.sourceforge.net/ . I am able to run the sample example that are provide within the same folder.
    But I need to use the same library for my projects. So i created a new project and copied the program tvplot from the qwt examples.

    I then added the following code in my .pro file

    @INCLUDEPATH += D:\Qwt\include
    DEPENDPATH += D:\Qwt\lib

    LIBS += -LD:\Qwt\lib

    win32 {
    CONFIG(debug, debug|release) {
    LIBS += -lqwtd
    } else {
    LIBS += -lqwt
    }
    }@

    But when i compile and run it gives error "cannot open include file qmemarray.h" . I have searched on the net for the header files as well as how to setup qwt libraries. But didnt get this working on windows 7.

    Thanks for your time :)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      QMemArray is a Qt3 relic. QVector would be the closest Qt4 equivalent. I have no idea why QWT tries to use it still... However, a quick search on "QMemArray Qwt" gives quite a number of hits. Perhaps your answer is among them?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sam
        wrote on last edited by
        #3

        Hi,
        Thanks for the reply Andre. I searched for "QMemArray Qwt" and have gone through all the links and solution in the first page. However I tried a different approach. I created a new Project in the same path where i have copied qwt e.g c:\qwt-6.0\examples. And then in the .pro file of my project i included

        @include( $${PWD}/../examples.pri )@

        Which is specified in all the .pro file in the example folder of QWT.

        It work and display the mainwindow with the charts. But if i create a folder in any other directory and then write

        @LOCATION = C:\qwt-6.0\examples

        include( $${LOCATION}/examples.pri )@

        It includes the files but shows the same error cannot include qmemarray.h

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Soumitra, did you find a reference to qmemarray.h in the source for QWT? I have QWT 6.0.1 source and I could not find a reference to this header file within the whole source tree.
          Possibly the problem is triggered by something else.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Sam
            wrote on last edited by
            #5

            Hi Koahnig,

            I couldnt find any reference to qmemarray.h . I searched for the file in the source folder but couldnt find one . When i click on the compiler error it opens qwt_array.h

            @/* -- mode: C++ ; c-file-style: "stroustrup" -- *****************************

            • Qwt Widget Library
            • Copyright (C) 1997 Josef Wilgen
            • Copyright (C) 2002 Uwe Rathmann
            • This library is free software; you can redistribute it and/or
            • modify it under the terms of the Qwt License, Version 1.0
              *****************************************************************************/

            // vim: expandtab

            #ifndef QWT_ARRAY_H
            #define QWT_ARRAY_H

            #include "qwt_global.h"

            /*!
            \def QwtArray
            Aliases QArray (Qt-2.x) and QMemArray (Qt-3.x) to QwtArray
            */
            #ifdef QWT_NO_MEMARRAY
            #include <qarray.h>
            #define QwtArray QArray
            #else
            #include <qmemarray.h> <---Here this file is included.
            #define QwtArray QMemArray
            #endif
            #endif@

            And even if i add qmemarray.h (source code from google search) Then the error changes to some other header file missing.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              In which folder do you have qwt_array.h ?
              I do not find this in my source tree?

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sam
                wrote on last edited by
                #7

                Hi koahnig,
                Sorry I was linking to the old library which i downloaded from "qwt":http://sourceforge.net/projects/qwt/. I switched the path to the current source library

                @INCLUDEPATH += C:\qwt-6.0\src
                DEPENDPATH += C:\qwt-6.0\lib

                LIBS += -LC:\qwt-6.0\lib@

                This works now for my project created in some other path. But I have written

                @LOCATION = C:\qwt-6.0\examples

                include( $${LOCATION}/examples.pri )@

                in my .pro which refers to the .pri file in qwt-6.0 source folder. This is working. Is this the right approach ?

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #8

                  If it compiles and you see no other issues, I would assume that it is correct. I am using QWT with MSVC and the include path is simply directed to src folder.
                  I am rarely using .pro and .pri files under windows.

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sam
                    wrote on last edited by
                    #9

                    Thanks for the help. As of now this is working but if there is any problem i'll come back again :)
                    I also need to implement the QwtPlot3D library too. I'll discuss that in other thread.

                    Thanks for your time :)

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved