Results 1 to 11 of 11

Thread: Runtime Error

  1. #1
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Runtime Error

    Guys I need your help!


    I'm using - qt-sdk-win-opensource-2009.01.1.exe

    I installed the qwt-5.2.0 in my opinion correctly, I see the QWT widget in Desiner and I can run the examples but...


    I added that to my *.pro file.
    INCLUDEPATH+= C:\qwt-5.2.0\include
    LIBS += -lqwt

    When I added the QwtPlot to the from that I have built, the whole application crashes...
    I recieve a following error:

    Microsoft Visual C++ Runtime Libary
    Runtime Error !

    This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

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

    Default Re: Runtime Error

    DEFINES += QWT_DLL

    Uwe

  3. #3
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Re: Runtime Error

    did not help. Still recieving this same error...

  4. #4
    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: Runtime Error

    Maybe there is problem with the code of your application? Can we see the 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.


  5. #5
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Re: Runtime Error

    I figured out that one include was commented. Now I see a different error

    collect2: ld returned 1 exit status

    when I try to compile the app in Qt command line I get this:

    c:\Qt\2009.01\mingw\bin\..\lib\gcc\mingw32\3.4.5\. .\..\..\..\mingw32\bin\ld.exe:
    cannot find -lqwt
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\network.exe] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qt/network'
    mingw32-make: *** [debug-all] Error 2


    because my app is to big I uploaded here.

    http://www.sendspace.com/file/xahm22

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

    Default Re: Runtime Error

    Quote Originally Posted by zawal View Post
    cannot find -lqwt
    This is an error message from the linker ( neither a runtime nor a compiler error ). The linker tells you, that it can't find the qwt library. You need to add the path to the library in your LIBS statement ( something like "LIBS += -L/where/it/is -lqwt".

    Uwe

  7. #7
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Re: Runtime Error

    this error message appears because of

    LIBS += -lqwt

    I changed my *.pro file to

    INCLUDEPATH += C:\qwt-5.2.0\src
    LIBS += C:\qwt-5.2.0\lib\qwt5.dll
    DEFINES += QWT_DLL

    and still getting error about Runtime...

  8. #8
    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: Runtime Error

    But did the compilation succeed or not?

    What happens if you copy the qwt5.dll to the folder containing your application?
    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. #9
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Re: Runtime Error

    looks like the compilation succeeded

    C:\Qt\2009.01\qt\network>make
    mingw32-make -f Makefile.Debug all
    mingw32-make[1]: Entering directory `C:/Qt/2009.01/qt/network'
    mingw32-make[1]: Nothing to be done for `all'.
    mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qt/network'
    mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory `C:/Qt/2009.01/qt/network'
    mingw32-make[1]: Nothing to be done for `all'.
    mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qt/network'

    but still cannot run the app.

  10. #10
    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: Runtime Error

    Did you copy the dll before running the program?

    By the way, placing your projects alongside Qt's source code might not be the best idea, especially if one of Qt's subdirectories is called "network" as well.
    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. #11
    Join Date
    Jul 2009
    Posts
    9
    Thanks
    1

    Default Re: Runtime Error

    Didn't know that the Qt has a subdir called "network"...
    Despite of that I decided to keep my folder as it is and throubleshoot my issue.
    I copied the data for examples.pri to my *.pro file (I set only my qwt root dir) and... it works right now.
    Weird...
    Thank you all guys for help, I really appreciate that!

Similar Threads

  1. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31

Tags for this Thread

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.