Results 1 to 20 of 51

Thread: Nothing works !

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Nothing works !

    Yes, you should replace it with the path to your Qwt installation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    I did it, as I said, and the problem remains. I haven't found if I had to change it somewhere else.

    One day, this will work !

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Nothing works !

    To confirm.
    You have Qwt 6.1 built with Qt5 and installed under /usr/local.

    So this is what you get:
    Qt Code:
    1. chrisw@newton ~ $ qmake -query QMAKEFEATURES
    2. /usr/local/qwt-6.1.0/features
    To copy to clipboard, switch view to plain text mode 
    and you have a pro file like:
    Qt Code:
    1. QT += core gui
    2. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    3.  
    4. TARGET = test
    5. TEMPLATE = app
    6. SOURCES += main.cpp\
    7. mainwindow.cpp
    8. HEADERS += mainwindow.h
    9. FORMS += mainwindow.ui
    10. CONFIG += qwt
    To copy to clipboard, switch view to plain text mode 
    and a basic program like the one you posted earlier. Your code compiles without warning or error, but "doesn't work" when started..

    If so, exactly what does "doesn't work" mean?

  4. #4
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    I don't have TARGET nor TEMPLATE in my .pro but appart from that you are right.

    In my code, I only create a qwt object.
    When I start the program, I have "realloc(): invalid pointer" followed by the backtrace and the memory map.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Nothing works !

    Can you show us your exact code?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    I just figured out that I had let the lines

    Qt Code:
    1. unix|win32: LIBS += -L$$PWD/../../../../../usr/local/qwt-6.1.0/lib/ -lqwt
    2.  
    3. #INCLUDEPATH += $$PWD/../../../../../usr/local/qwt-6.1.0/include
    4. #DEPENDPATH += $$PWD/../../../../../usr/local/qwt-6.1.0/include
    To copy to clipboard, switch view to plain text mode 

    in the .pro while I thought I had suppressed them when wysota told me to.
    Actually, the code only compiled because of them. New project, new try, new errors ; there I have (the most simple I can) :

    Qt Code:
    1. QT += core gui
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. TARGET = qwt_test
    6. TEMPLATE = app
    7.  
    8. CONFIG += qwt # hand added
    9.  
    10.  
    11. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    for the .pro

    Qt Code:
    1. #include <QApplication>
    2.  
    3. #include<qwt_compass.h>
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QApplication a(argc, argv);
    8. //MainWindow w;
    9. //w.show();
    10. QwtCompass compass;
    11. compass.show();
    12.  
    13. return a.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 

    for main.cpp

    That code does not compile. It returns :
    Qt Code:
    1. In function `MainWindow::on_actionTest_triggered()':
    2. error: undefined reference to `QwtCompass::QwtCompass(QWidget*)'
    3. error: undefined reference to `QwtCompass::~QwtCompass()'
    4. error: collect2: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 

    I had all reinstalled following the steps online, no more no less.
    (First installation I had copied the .so but I was told I should not have.)

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Nothing works !

    What is the output of qmake -query QMAKEFEATURES?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    It is still "/usr/local/qwt-6.1.0/features/" since I have changed it with "qmake -set QMAKEFEATURES" and the right path. :-)

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Nothing works !

    1. Make sure this is the right qmake that you are using
    2. Make sure the directory contains the qwt.prf file
    3. Make sure the qwt.prf file contains a reference to the qwt library
    4. Show us the last compiler invocation for your project.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    1. Make sure this is the right qmake that you are using
    I compile with QtCreator ; Qt Version is autodetected with location of qmake the same as what I used to compile qwt. So this is OK I think.
    2. Make sure the directory contains the qwt.prf file
    Which directory ? :s
    If it is qwt_root/features, yes it contains qwt.prf
    3. Make sure the qwt.prf file contains a reference to the qwt library
    it contains :
    Qt Code:
    1. include ( ./qwtconfig.pri )
    2. include ( ./qwtfunctions.pri )
    3.  
    4. contains(QWT_CONFIG, QwtDll) {
    5.  
    6. DEFINES *= QWT_DLL
    7. }
    8.  
    9. contains(QWT_CONFIG, QwtSvg) {
    10.  
    11. QT *= svg
    12. }
    13. else {
    14.  
    15. DEFINES *= QWT_NO_SVG
    16. }
    17.  
    18. contains(QWT_CONFIG, QwtFramework) {
    19.  
    20. INCLUDEPATH *= $${QWT_INSTALL_LIBS}/qwt.framework/Headers
    21. LIBS *= -F$${QWT_INSTALL_LIBS}
    22. }
    23. else {
    24.  
    25. INCLUDEPATH *= $${QWT_INSTALL_HEADERS}
    26. LIBS *= -L$${QWT_INSTALL_LIBS}
    27. }
    28.  
    29. qwtAddLibrary(qwt)
    To copy to clipboard, switch view to plain text mode 

    4. Show us the last compiler invocation for your project.
    I compile in QtCreator. What should I show you ?

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Nothing works !

    Quote Originally Posted by Amoliane View Post
    I compile with QtCreator ; Qt Version is autodetected with location of qmake the same as what I used to compile qwt. So this is OK I think.
    Don't think, please. Check.

    Which directory ? :s
    The one returned by qmake -query QMAKEFEATURES

    I compile in QtCreator. What should I show you ?
    The last compiler invocation (from the "compiler messages" pane).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    May 2013
    Posts
    29
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Nothing works !

    Don't think, please. Check.
    I tell you what I can ! QtCreator tells me it uses qmake from the same path I have used to make qwt ; I believe that is what you ask. But as long as I am not sure, I tell you that I think it is OK. No need to be aggressive. Just tell me if this is your meaning of "the right qmake" or not !

    The one returned by qmake -query QMAKEFEATURES
    So yes as I said.

    The last compiler invocation (from the "compiler messages" pane).
    Qt Code:
    1. 14:48:37: Configuration unchanged, skipping qmake step.
    2. 14:48:37: Starting: "/usr/bin/make"
    3. g++ -m64 -Wl,-rpath,/home/developpeur/Qt5.0.2/5.0.2/gcc_64 -Wl,-rpath,/home/developpeur/Qt5.0.2/5.0.2/gcc_64/lib -o qwt_test main.o -L/usr/X11R6/lib64 -L/home/developpeur/Qt5.0.2/5.0.2/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    4. main.o: In function `main':
    5. /home/developpeur/developpement/stageCamille/build-qwt_test-Desktop_Qt_5_0_2_GCC_64bit-Debug/../qwt_test/main.cpp:9: undefined reference to `QwtCompass::QwtCompass(QWidget*)'
    6. /home/developpeur/developpement/stageCamille/build-qwt_test-Desktop_Qt_5_0_2_GCC_64bit-Debug/../qwt_test/main.cpp:12: undefined reference to `QwtCompass::~QwtCompass()'
    7. /home/developpeur/developpement/stageCamille/build-qwt_test-Desktop_Qt_5_0_2_GCC_64bit-Debug/../qwt_test/main.cpp:12: undefined reference to `QwtCompass::~QwtCompass()'
    8. collect2: ld returned 1 exit status
    9. make: *** [qwt_test] Error 1
    10. 14:48:37: The process "/usr/bin/make" exited with code 2.
    11. Error while building/deploying project qwt_test (kit: Desktop Qt 5.0.2 GCC 64bit)
    12. When executing step 'Make'
    13. 14:48:38: Elapsed time: 00:00.
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. don't works on linux ?
    By 21did21 in forum Qwt
    Replies: 5
    Last Post: 5th September 2011, 09:28
  2. Where can i learn how qml works?
    By tuxit in forum Qt Quick
    Replies: 3
    Last Post: 9th August 2011, 19:01
  3. Replies: 3
    Last Post: 6th July 2011, 06:59
  4. How works tile() ?
    By looki in forum Qt Programming
    Replies: 0
    Last Post: 30th September 2008, 13:25
  5. How simpletreeview example works?
    By igorko in forum Qt Programming
    Replies: 1
    Last Post: 19th June 2006, 09:59

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.