[SOLVED] QWT 6.0 library in QT
Hi,
I have downloaded QWT 6.0 from svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-6.0 [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 :)
8 replies
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
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.
Hi koahnig,
Sorry I was linking to the old library which i downloaded from qwt [sourceforge.net]. 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 ?
You must log in to post a reply. Not a member yet? Register here!





