Results 1 to 7 of 7

Thread: Installing QwtPolar: very special problem linking examples

  1. #1
    Join Date
    Jul 2011
    Location
    Kiel, Germany
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Installing QwtPolar: very special problem linking examples

    I use Qt 4.6.2 and Qwt 6.0.0 rc5, so the version 0.1.0 of QwtPolar did not compile.
    Following the Thread "QwtPolar with latest QWT" I got the trunk from QwtPolar via SVN, fixed some include problems compiling the library qwtpolar, and finally got the library.

    When I try to link the examples, I get the error
    moc_plot.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPolarPlot::staticMetaObject" (?staticMetaObject@QwtPolarPlot@@2UQMetaObject@@B)
    despite the fact, that the build log tells me, that the correct library is used.

    My own application links well (as I use dynamic library), but fails, when it comes to
    Qt Code:
    1. void setupUi(QMainWindow *ESM_GUI)
    2. {
    3. ...
    4. qwtPolarPlot = new QwtPolarPlot(tabPolar);
    5. ...
    6. }
    To copy to clipboard, switch view to plain text mode 

    In all of the libraries (static and dynamic) I can verify, that the missing function is contained.
    I use MS Visual Studio 2008 for development.

    Are there any suggestions to solve this problem?

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

    Default Re: Installing QwtPolar: very special problem linking examples

    This is a common problem with building Qt applications, when the makefile is not aware of running moc for a file.

    Uwe

  3. #3
    Join Date
    Jul 2011
    Location
    Kiel, Germany
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Installing QwtPolar: very special problem linking examples

    Thank you for answering, but this idea had most of my colleagues already. As I tried to explain: moc compiler ran, the moc-object was created, the library was created without any error and (for the DLL with depends.exe, for the libs with an editor) I can see, that quite that export is contained, that the linker is missing (please see my first post).

    A colleague of mine also tried the same with Qt 4.7.3, Qwt6 and the QwtPolar trunk and stuck at the same problem. Can there be anything wrong with the configuration files? The only thing I changed was introducing the path to my installation directory. And I copied the feature files to the Qt mkspec/features directory.

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

    Default Re: Installing QwtPolar: very special problem linking examples

    Did you set QWT_POLAR_DLL, when compiling your code ?

    Uwe

  5. The following 2 users say thank you to Uwe for this useful post:

    BestBeforeNow (22nd July 2011), Temo (15th May 2013)

  6. #5
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Installing QwtPolar: very special problem linking examples

    Hi,

    I'm a absolute beginner.

    As per instruction, I have installed Qt 4.7.1, Qwt 6.0.1 and QwtPolar 1.0.0

    I got the same error as mentioned in the first thread while building the Qwt Polar examples.

    I'm using QT-creator. I copied all header and source files of qwtpolar-1.0.0\examples\polardemo to a new project. I have following contents in project file:

    QT += core
    QT += gui

    TARGET = PolarExample
    CONFIG += console
    CONFIG -= app_bundle
    CONFIG += release

    CONFIG += qwt
    CONFIG += qwtpolar

    TEMPLATE = app

    INCLUDEPATH += C:\QwtPolar-1.0.0\include \
    C:\Qwt-6.0.1\include

    LIBS += C:\QwtPolar-1.0.0\lib\qwtpolar.lib \
    C:\Qwt-6.0.1\lib\qwt.lib

    SOURCES += main.cpp \
    mainwindow.cpp \
    plot.cpp \
    settingseditor.cpp

    HEADERS += mainwindow.h \
    pixmaps.h \
    plot.h \
    settingseditor.h
    I was not able to correctly figure out the solution for error by going through the discussion. I understand that setting QWT_POLAR_DLL while compiling the code should solve the probblem.

    As I'm a complete beginner, please guide how or where to set QWT_POLAR_DLL ??

    Thank you.





  7. #6
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Installing QwtPolar: very special problem linking examples

    Add
    Qt Code:
    1. win32: DEFINES += QWT_POLAR_DLL
    To copy to clipboard, switch view to plain text mode 
    to your .pro file.

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

    Default Re: Installing QwtPolar: very special problem linking examples

    Better do a clean installation of Qwt and QwtPolar using "make install". Then configure your qmake environment like documented in the INSTALL files and add

    Qt Code:
    1. CONFIG += qwt
    2. CONFIG += qwtpolar
    To copy to clipboard, switch view to plain text mode 
    to your pro file.

    Uwe

Similar Threads

  1. QwtPolar or QwtPlot examples do not start
    By giusepped in forum Qwt
    Replies: 2
    Last Post: 15th March 2010, 05:09
  2. Problem running QwtPolar examples
    By MSUdom5 in forum Qwt
    Replies: 4
    Last Post: 11th March 2010, 18:26
  3. Installing examples/demos for QT4
    By steak-sandwich in forum Installation and Deployment
    Replies: 2
    Last Post: 8th January 2010, 12:57
  4. Installation problem with QwtPolar
    By Ju_29 in forum Qwt
    Replies: 4
    Last Post: 25th May 2009, 14:04
  5. Problem cross compiling examples/demo on mips.Qmake/Linking?
    By Cursedbeasty in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th July 2007, 10:53

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.