Results 1 to 5 of 5

Thread: Qwt app compile error

  1. #1
    Join Date
    May 2009
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Qwt app compile error

    I'm having problems with compiling the Qwt test applications. I'm using Qt Creator 1.1.0 and Qt 2009.02, and I've downloaded the Qwt 5.2.0 libraries. I'm developing in WinXP SP3.

    I've copied some of the Qwt example files into new directories and imported them into Qt Creator through the relevant "pro" file (e.g. the one in "\examples\simple_plot"). The application builds fine, but exits immediately and gives the following error when I run it:

    Qt Code:
    1. C:/Work/Qt/plot_test/debug/plot_test.exe exited with code -1073741515
    To copy to clipboard, switch view to plain text mode 

    If however I open up the example files directly from the <QwtRoot>\examples\... directory, they compile fine in QtCreator.

    I've noticed a few other people on this forum having similar problems (e.g. here and here) but there are no suggested solutions in those cases.

    Any ideas what could be going wrong? This is a minimal case, but the real issue is that I get this error message when I compile my custom applications in QtCreator whenever they make use of the Qwt libraries. Any suggestions would be greatly appreciated.
    Last edited by ajb; 25th June 2009 at 12:49.

  2. #2
    Join Date
    May 2009
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt app compile error

    OK it looks like it's got to do with the PRO file. This thread is very handy.

    I've followed the suggestions in that thread and I'm still getting the same problem. My PRO file is:

    Qt Code:
    1. #include( C:\Qt\qwt-5.2.0\examples\examples.pri )
    2. include( C:\Qt\qwt-5.2.0\qwtconfig.pri )
    3.  
    4. TARGET = data_plot
    5.  
    6. HEADERS = \
    7. data_plot.h
    8.  
    9. SOURCES = \
    10. data_plot.cpp \
    11. main.cpp
    12.  
    13. LIBS += C:\Qt\qwt-5.2.0\lib\qwt5.dll
    14. INCLUDEPATH += C:\Qt\qwt-5.2.0\src
    15. DEFINES += QWT_DLL
    To copy to clipboard, switch view to plain text mode 

    Is there anything obviously wrong with this? (The installation directory for Qwt is C:\Qt\qwt-5.2.0 )

  3. #3
    Join Date
    May 2009
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt app compile error

    Fixed. Had to first do a clean / rebuild to see the effects of the changes. Then copied examples.pri into my .pro file, and narrowed down the key additional lines to the following:

    Qt Code:
    1. QWT_ROOT = c:/Qt/qwt-5.2.0
    2. INCLUDEPATH += $${QWT_ROOT}/src
    3. QWTLIB = qwt$${SUFFIX_STR}
    4. LIBS += -L$${QWT_ROOT}/lib -l$${QWTLIB}
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Mar 2010
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qwt app compile error

    Hi!

    I'm recovering this thread because I have exactly the same problem. There's only one difference... i'm using QtCreator 1.3.1 based on Qt 4.6.2

    The installation of qwt5.2 has been completed successfully and i've applied the solutions posted here before.

    In my .pro file I have added:

    Qt Code:
    1. QWT_ROOT = C:\Qt\2010.02.1\qt\Qwt-5.2.1
    2.  
    3. INCLUDEPATH += $${QWT_ROOT}\include
    4.  
    5. QWTLIB = qwt5$${SUFFIX_STR}
    6.  
    7. LIBS += -L$${QWT_ROOT}\lib\qwtd5.dll -l$${QWTLIB}
    8.  
    9. DEFINES += QWT_DLL
    To copy to clipboard, switch view to plain text mode 

    All seems to work perfectly since the program exits unexpectedly returning -1073741515

    Could the problem be related with incompatibility between qwt5.2 and qt4.6.2 ? I don't think so but I really don't know.

    I would appreciate any suggestions! I'm very stucked right now! Thanks!

    I'm using Windows, by the way.

  5. #5
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt app compile error

    Hi,
    I do have the same problem when I try to compile it with the qtcreator...
    So tried using the Qt Command Prompt and the pro executed with out any problem...
    But in order to open the .exe genrated I copied the qwt5.dll to the debug folder where the exe was generated...
    then it worked well

    win32 {
    INCLUDEPATH += C:/Qt/qwt-5.2.0/src #your path for qwt source code
    LIBS += -L C:/Qt/qwt-5.2.0/lib/ -lqwt5 #your path for qwt lib files.
    }

    after adding it you need to go to qt Command prompt and
    enter
    qmake ****.pro
    mingw32-make
    this will do it but you need to put the QtGui4.dll,QtCore4.dll,QtSvg4.dll and qwt5.dll into the debug folder and then open the executable file...

Similar Threads

  1. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  2. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  3. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 17:04
  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.