Seite 1 von 1

Qwt Problem

Verfasst: 1. März 2010 11:14
von GrooveXT
Hallo,
ich habe ein Programm geschrieben das massiv gebrauch von Qwt macht. Wegen eines Toolbar-Anzeige-Bugs in Qt 4.6.0 habe ich dann auf die neuste Version (4.6.2) upgedatet. Nun bekomme ich mein Programm aber nicht mehr ans rennen. Vor dem Update ging alles super, jetzt fliege ich immer mit folgendem Fehler raus:
c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lqwtd
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\eView.exe] Error 1
mingw32-make: *** [debug-all] Error 2
Ich habe nix an den Projekteinstellungen geändert. Ich habe nur qwt erneut mit 4.6.2 compiliert und die dll's entsprchend verteilt...soweit ich das zumindest weiß...habe leider das Tutorial von der Erstinstallation verloren. Auch habe ich das Problem das mir damals bei der qwt Komilierung folgende Dateien generiert wurden, die jetzt nicht mehr erstelllt werden (die exp, ilk und lib dateien). Ich habe nur noch dlls und .a Dateien.


Mein Entwicklungssystem
Win7 x64 Prof, QtCreator 1.3.1, Qt 4.6.2, Qwt 5.2 (neuste SVN Version)


Hier mal meine qwtconfig

Code: Alles auswählen

######################################################################
# Install paths
######################################################################

VER_MAJ      = 5
VER_MIN      = 2
VER_PAT      = 1
VERSION      = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}

unix {
    INSTALLBASE    = /usr/local/qwt-$$VERSION
}

win32 {
    INSTALLBASE    = C:/qt/Qwt-$$VERSION
}

target.path    = $$INSTALLBASE/lib
headers.path   = $$INSTALLBASE/include
doc.path       = $$INSTALLBASE/doc

######################################################################
# qmake internal options
######################################################################

CONFIG           += qt     # Also for Qtopia Core!
CONFIG           += warn_on
CONFIG           += thread
CONFIG           += silent

######################################################################
# release/debug mode
# If you want to build both DEBUG_SUFFIX and RELEASE_SUFFIX
# have to differ to avoid, that they overwrite each other.
######################################################################

VVERSION = $$[QT_VERSION]
isEmpty(VVERSION) {

    # Qt 3
    CONFIG           += debug     # release/debug
}
else {
    # Qt 4
    win32 {
        # On Windows you can't mix release and debug libraries.
        # The designer is built in release mode. If you like to use it
        # you need a release version. For your own application development you
        # might need a debug version.
        # Enable debug_and_release + build_all if you want to build both.

        #CONFIG           += debug     # release/debug/debug_and_release
        CONFIG           += debug_and_release
        CONFIG           += build_all
    }
    else {
        CONFIG           += debug_and_release
        CONFIG           += build_all
    }
}

######################################################################
# If you want to have different names for the debug and release
# versions you can add a suffix rule below.
######################################################################

DEBUG_SUFFIX        =
RELEASE_SUFFIX      =

win32 {
    DEBUG_SUFFIX      = d
}

######################################################################
# Build the static/shared libraries.
# If QwtDll is enabled, a shared library is built, otherwise
# it will be a static library.
######################################################################

CONFIG           += QwtDll

######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# widget.
######################################################################

CONFIG       += QwtPlot

######################################################################
# QwtWidgets enables all classes, that are needed to use the all other
# widgets (sliders, dials, ...), beside QwtPlot.
######################################################################

CONFIG     += QwtWidgets

######################################################################
# If you want to display svg imageson the plot canvas, enable the
# line below. Note that Qwt needs the svg+xml, when enabling
# QwtSVGItem.
######################################################################

#CONFIG     += QwtSVGItem

######################################################################
# You can use the MathML renderer of the Qt solutions package to
# enable MathML support in Qwt.  # If you want this, copy
# qtmmlwidget.h + qtmmlwidget.cpp to # textengines/mathml and enable
# the line below.
######################################################################

#CONFIG     += QwtMathML

######################################################################
# If you want to build the Qwt designer plugin,
# enable the line below.
# Otherwise you have to build it from the designer directory.
######################################################################

CONFIG     += QwtDesigner

######################################################################
# If you want to auto build the examples, enable the line below
# Otherwise you have to build them from the examples directory.
######################################################################

#CONFIG     += QwtExamples

Danke.[/code]

Verfasst: 1. März 2010 12:01
von AuE
und wie sieht dein pro file aus?

er sheint die lib nicht zu finden

Verfasst: 1. März 2010 12:04
von GrooveXT
Sorry, vergessen, hier meine pro Datei

Code: Alles auswählen

# -------------------------------------------------
# Project created by QtCreator 2010-01-21T10:01:38
# -------------------------------------------------
include(C:/qt/qwt-5.2/qwtconfig.pri)
QT += network \
    opengl \
    sql \
    webkit \
    xml \
    xmlpatterns
TARGET = eView
TEMPLATE = app
win* { 
    INCLUDEPATH += C:/qt/qwt-5.2/src
    DEFINES += QT_DLL \
        QWT_DLL
    Debug { 
        CONFIG += console
        LIBS += -L \
            C:/qt/qwt-5.2/lib \
            -lqwtd
    }
    Release { 
        CONFIG -= console
        LIBS += -L \
            C:/qt/qwt-5.2/lib \
            -lqwt5
    }
}
SOURCES += main.cpp \
    mainwindow.cpp \
    dataimport.cpp \
    filereader.cpp \
    datadisplay.cpp \
    diagram/diagramdata.cpp \
    diagram/curve.cpp \
    diagram/axis.cpp \
    edata.cpp \
    diagram/diagramplot.cpp \
    diagram/axisdialog.cpp \
    diagram/diagramtoolbar.cpp \
    menuwidget.cpp
HEADERS += mainwindow.h \
    dataimport.h \
    filereader.h \
    datadisplay.h \
    diagram/diagramdata.h \
    diagram/curve.h \
    diagram/axis.h \
    eView.h \
    edata.h \
    diagram/diagramplot.h \
    diagram/axisdialog.h \
    diagram/diagramtoolbar.h \
    menuwidget.h
FORMS += mainwindow.ui \
    dataimport.ui \
    datadisplay.ui \
    diagram/axisdialog.ui
OTHER_FILES += 
Mir wird keine Datei erstellt, ich weiß aber nicht warum.

Verfasst: 1. März 2010 12:18
von AuE
Gibt es denn die qwtd Datei????

Bei mir sieht das lib verzeichnis so aus:
lrwxrwxrwx 1 root staff 15 Dec 17 10:46 libqwt.so -> libqwt.so.5.2.0
lrwxrwxrwx 1 root staff 15 Dec 17 10:46 libqwt.so.5 -> libqwt.so.5.2.0
lrwxrwxrwx 1 root staff 15 Dec 17 10:46 libqwt.so.5.2 -> libqwt.so.5.2.0
-rwxr-xr-x 1 root staff 863368 Dec 17 10:46 libqwt.so.5.2.0

Verfasst: 1. März 2010 12:40
von MiKla
Wenn ich mich richtig errinnere, dann heißt die "qwt5d.lib".

Michael

Verfasst: 1. März 2010 16:28
von GrooveXT
Also mit der geposteten qwtconfig pri entstehen 4 Dateien
  • qwt5.dll
    qwtd5.dll
    libqwt5.a
    libqwtd5.a
Diese habe ich jeweils in die Ordner %QTDIR%/bin und %QTDIR%/lib kopiert. Leider lässt sich mein Programm immer noch nicht kompilieren....jedoch kann ich die Beispiele übersetzen und ausführen....jetzt bin ich ganz verwirrt.

Man das es dafür aber auch keine vernünftige Anleitung gibt.

Verfasst: 1. März 2010 16:30
von AuE
C:/qt/qwt-5.2/lib \
-lqwtd

und
qwtd5.dll
passen nicht ganz oder?

Verfasst: 1. März 2010 16:37
von GrooveXT
AuE hat geschrieben:
C:/qt/qwt-5.2/lib \
-lqwtd

und
qwtd5.dll
passen nicht ganz oder?
Erläuter das bitte...ich habe einen Schimmer was diese Anweisungen machen. Ich habe die vor einiger Zeit mal irgendwo abgeschrieben und weiß das sie vor dem Update funktioniert haben.

Danke

Verfasst: 1. März 2010 17:21
von MiKla
In etwa so:

Code: Alles auswählen

...
        LIBS += -L \
            C:/qt/qwt-5.2/lib \
            -lqwt5d 
...
"-lqwt5d" ist eine Linkanweisung, die sagt, dass die libqwt5.lib dazu gelinkt werden soll. "-LC:/qt/qwt-5.2/lib" Sagt dem Linker wo er sie suchen soll!!!

Michael