Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 51

Thread: Nothing works !

  1. #21
    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.

  2. #22
    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.


  3. #23
    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.)

  4. #24
    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.


  5. #25
    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. :-)

  6. #26
    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.


  7. #27
    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 ?

  8. #28
    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.


  9. #29
    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 

  10. #30
    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 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 !
    I am not being aggressive. I'm asking you to make sure you are using the same qmake for compilation of your applications as you used to change the QMAKEFEATURES variable.

    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 
    You can see there are no lines here that try to link your application against Qwt. This can happen as a result of one of two things:
    1. You don't have a CONFIG += qwt line in your project file
    2. The qwt.prf file is not found by qmake.

    You need to verify both of these yourself as we have no access to your machine. You can use qmake's message() function to test whether the prf file is being executed or not (e.g. by putting message("I am executed") in qwt.prf and reruning qmake).
    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.


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

    Default Re: Nothing works !

    I have added message("I am executed") in qwt.prf, executing qmake and watching the result on the compile output. I have this :

    Qt Code:
    1. 16:14:47: Running steps for project qwt_test...
    2. 16:14:47: Starting: "/home/developpeur/Qt5.0.2/5.0.2/gcc_64/bin/qmake" /home/developpeur/developpement/stageCamille/qwt_test/qwt_test.pro -r -spec linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
    3. 16:14:47: The process "/home/developpeur/Qt5.0.2/5.0.2/gcc_64/bin/qmake" exited normally.
    4. 16:14:47: Elapsed time: 00:00.
    To copy to clipboard, switch view to plain text mode 

    Is it normal that "CONFIG+=qwt" is not written there ? It is actually in the .pro.
    There is no mention of the message so I guess qwt.prf is not found.

  12. #32
    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 !

    Does /home/developpeur/developpement/stageCamille/qwt_test/qwt_test.pro file contain a "CONFIG += qwt" line?
    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.


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

    Default Re: Nothing works !

    yes, the line always is there.

  14. #34
    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 !

    Please go to project build settings, expand the qmake pane and in the extra arguments field enter -query QMAKEFEATURES. Then ask Creator to rerun qmake and see if a proper path is reported.
    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.


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

    Default Re: Nothing works !

    I cannot find where there is an extra arguments fields.
    Should it be there ?

    Screenshot from 2013-06-26 10:49:09.jpg

    There is no other settings, is there ?

  16. #36
    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 !

    In the project settings, not in Creator settings.

    This is starting to be a thread on Qt Creator rather than on Qwt...
    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.


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

    Default Re: Nothing works !

    I found it, sorry.
    It now build with "qmake qwt_test.pro -r -spec linux-g++-64 -query QMAKEFEATURES".
    It tells me
    Unknown option -query
    11:35:46: The process "/home/developpeur/Qt5.0.2/5.0.2/gcc_64/bin/qmake" exited with code 1.

  18. #38
    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 !

    Ok, forget it. Open the console, add type in:

    /home/developpeur/Qt5.0.2/5.0.2/gcc_64/bin/qmake -query QMAKEFEATURES

    Does it report the proper path?
    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.


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

    Default Re: Nothing works !

    It reports "**Unknown**"

  20. #40
    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 !

    So you were using the wrong qmake (despite what you said earlier).

    Call /home/developpeur/Qt5.0.2/5.0.2/gcc_64/bin/qmake -set QMAKEFEATURES <pathtoqwt>/features and all should be fine.

    BTW. Be sure to build Qwt with that exact qmake.
    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.


Similar Threads

  1. don't works on linux ?
    By 21did21 in forum Qwt
    Replies: 5
    Last Post: 5th September 2011, 10:28
  2. Where can i learn how qml works?
    By tuxit in forum Qt Quick
    Replies: 3
    Last Post: 9th August 2011, 20:01
  3. Replies: 3
    Last Post: 6th July 2011, 07:59
  4. How works tile() ?
    By looki in forum Qt Programming
    Replies: 0
    Last Post: 30th September 2008, 14:25
  5. How simpletreeview example works?
    By igorko in forum Qt Programming
    Replies: 1
    Last Post: 19th June 2006, 10: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.