Results 1 to 10 of 10

Thread: Using Qwt in eclipse CDT

  1. #1
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Using Qwt in eclipse CDT

    I am using Eclipse CDT and Qt4 on Windows XP,
    how can I include Qwt classes in my project?
    note that I don't need to use Qwt classes to appear in the designer's Widget Box, rather I just want to include and use Qwt classes in code...

    Thanks in advance

  2. #2
    Join Date
    Jan 2009
    Posts
    17
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using Qwt in eclipse CDT

    I added the include path to the eclipse project file (see attachment) as well as to the QT's .pro project file like...

    INCLUDEPATH += /usr/local/qwt-5.1.1/include
    LIBS += /usr/local/qwt-5.1.1/lib/libqwt.a

    ...where /usr/local/qwt-5.1.1 is the installation path of the library.
    By the way I use the QT plug-in for eclipse which helps a lot.

    I'm working on Linux, perhaps there are differences on XP.
    Best Regards
    Stefan
    Attached Images Attached Images

  3. #3
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qwt in eclipse CDT

    Thanks for replying,
    I am using Qwt 5.2.0 and I didn't find the "Include" directory in Qwt...
    Last edited by Lawand; 31st March 2009 at 16:33.

  4. #4
    Join Date
    Oct 2008
    Posts
    74
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qwt in eclipse CDT

    Hi

    You could create a Qwt folder in the your Qt include folder and copy all the header files from qwt5.2/src directory to it

    Regards

  5. The following user says thank you to dbrmik for this useful post:

    Lawand (31st March 2009)

  6. #5
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qwt in eclipse CDT

    seems like the "src" is the one I should include, I done like StefanK's screenshot (added "C:\qwt-5.2.0\src" into Include Paths)

    And then added:
    INCLUDEPATH += C:\qwt-5.2.0\src
    LIBS += C:\qwt-5.2.0\lib\libqwt5.a
    into the project file (.pro) and now the build succeeds but the application gets terminated right after I launch it and I get this error:
    The application failed to initialize properly (0xc0000005). Click on OK to terminate the application.

  7. #6
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs up Re: Using Qwt in eclipse CDT

    I edited qwtconfig.pri and removed this line:
    Qt Code:
    1. CONFIG += QwtDll
    To copy to clipboard, switch view to plain text mode 
    thus, building Qwt as a static library,
    and the problem is solved

    Thanks guys for your help.

  8. #7
    Join Date
    Jan 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Using Qwt in eclipse CDT

    Hi,
    I am trying something similar and having the smae problem. Basically, I want to have an attitude indicator in an application exactly like the qwt example. I have compiles qwt fine and have successfully compiled and run the samle with the attitude indicator, and added a dial to the ui.

    When I try to add the attitude_indicator.cpp and .h files to the project (without using them) it will still compile but returns

    Qt Code:
    1. exited with code -1073741819
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. exited with code -1073741511
    To copy to clipboard, switch view to plain text mode 

    Running gdb returns

    Qt Code:
    1. Program received signal SIGSEGV, Segmentation Fault.
    2. Program exited with code 0x30000000005
    To copy to clipboard, switch view to plain text mode 

    What could be causing this? This is my .pro file:
    Qt Code:
    1. TARGET = Test1
    2. TEMPLATE = app
    3.  
    4.  
    5. SOURCES += main.cpp\
    6. mainwindow.cpp \
    7. attitude_indicator.cpp
    8.  
    9. HEADERS += mainwindow.h \
    10. attitude_indicator.h
    11.  
    12.  
    13. FORMS += mainwindow.ui
    14.  
    15. INCLUDEPATH += "C:\Qwt-5.2.0\include"
    16. LIBS += -L"C:\Qwt-5.2.0\lib" \
    17. -lqwt5
    To copy to clipboard, switch view to plain text mode 

    Any ideas would be appreciated. Thanks
    Last edited by derektaprell; 7th May 2009 at 13:58.

  9. #8
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qwt in eclipse CDT

    Perhaps you should put the Qwt dll file next to the binary (exe) file.

  10. #9
    Join Date
    Jan 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Using Qwt in eclipse CDT

    Thanks Lawand, unfortunately that did not help. I have solved the problem from your idea though. I had a whole bunch of dlls in the exe folder already and since I reinstalled qt a few days ago the QtGui4.dll did not like playing with Qwt5.dll (possibly from different compiler versions?).

    Thanks for your help

  11. #10
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using Qwt in eclipse CDT

    You're Welcome

Similar Threads

  1. Replies: 1
    Last Post: 6th January 2009, 14:46
  2. Qwt(histogram) in eclipse?
    By kid17 in forum Qwt
    Replies: 1
    Last Post: 29th November 2008, 12:38
  3. QWT 5.1.0 installation with eclipse
    By kokasurfer in forum Installation and Deployment
    Replies: 1
    Last Post: 17th September 2008, 10:04
  4. Qt commercial with eclipse and cl.exe
    By wojtek in forum Qt-based Software
    Replies: 1
    Last Post: 3rd July 2008, 14:55
  5. Howto use Eclipse with QT4 in 10 steps
    By the_bis in forum Newbie
    Replies: 3
    Last Post: 28th January 2007, 20:21

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.