Results 1 to 8 of 8

Thread: QT Eclipse Integration

  1. #1
    Join Date
    Jan 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QT Eclipse Integration

    Hi all, i have downloaded and installed "QT Eclipse Integration 1.4.3". All is ok when i start a QT Gui project.
    But when i start an empty C++ project, i get many errors. For example i have run the Image Viewer example http://doc.trolltech.com/4.4/widgets-imageviewer.html and got a bunch of errors like "error: ISO C++ forbids declaration of `Q_OBJECT' with no type" etc.
    I have added the include paths "C:\Qt\4.4.3\include\Qt", "C:\Qt\4.4.3\include\QtGui", "C:\Qt\4.4.3\include\QtOpenGL", "C:\Qt\4.4.3\include\QtCore" and added libraries "libQtCore4", "libqtmain", "libQtGui4" to the project.
    What may be wrong with my project settings?
    Best Regards,

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT Eclipse Integration

    It might not be enough to add necessary include paths and linking rules. Qt projects tend to need a set of compiler defines and special makefile rules for moc & friends. Isn't there a way to import a Qt project from a .pro file?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Eclipse Integration

    Well, i was thinking to develop an image processing application on my own, and just wanted to start a regular C++ project. So, do you mean that i should always start a "Qt Gui" or "Qt Console" project to successfully utilize QT library?

  4. #4
    Join Date
    Nov 2008
    Posts
    142
    Thanks
    3
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Eclipse Integration

    You could probably get away with creating a plain C++ project, but you would have to do all the Qt-specific compiler settings etc yourself. Just use the Qt projects. After all, they are provided to make your life easier

  5. #5
    Join Date
    Jan 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Eclipse Integration

    Yesterday when i started a QT Gui project, it was good till i wanted to add another 3rd party library to my project(OpenCV). I wasnt be able to link OpenCV libraries properly. But when i start a regular C++ project, i can do that.

  6. #6
    Join Date
    Nov 2008
    Posts
    142
    Thanks
    3
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Eclipse Integration

    Frankly, I am not very familiar with how stuff like that is done with Eclipse, I haven't used CDT or the Qt Eclipse Integration much. I have tested it, tried to use it for a while, but found that I still like KDevelop better for these tasks Eclipse is a great Java/J2EE IDE, but I just can't get used to it for any other tasks. But probably some in this forum can help you with that problem, adding third party libraries is not an uncommon requirement and I would be very astonished if Eclipse Integration wasn't able to do so. If it was, it would certainly be worth a bug report.

    Besides, have you tested Qt Creator? Note that I don't promise you that adding third party libraries will work, as I have only tested it briefly, too, before returning to KDevelop, but it seems to be the way the Trolls are going at the moment, and if it doesn't work a bug report should really get them going there

  7. #7
    Join Date
    Jan 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Eclipse Integration

    Man its so weird that i cant debug the project!! ok i have set up a Qt gui project and it builds fine, it also runs fine , but it wont debug ! the error is
    Error creating session
    Process Terminated
    Process Terminated
    Process Terminated


  8. #8
    Join Date
    Jan 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Eclipse Integration

    Hi, i have changed the GDB version from 6.8 to 6.6 and its ok now..

Similar Threads

  1. A Guide to Install MinGW, Qt4 and Eclipse Integration on Windows XP
    By shiyutang in forum Installation and Deployment
    Replies: 10
    Last Post: 5th August 2009, 04:03
  2. Eclipse integration in Kubuntu/Ubuntu 64 bit
    By FreddyAV in forum Installation and Deployment
    Replies: 2
    Last Post: 2nd October 2008, 20:42
  3. Plugins & Qt - Eclipse integration
    By Mel in forum Qt Tools
    Replies: 1
    Last Post: 25th September 2008, 14:39
  4. Qt integration with Eclipse
    By Dougie1610 in forum Newbie
    Replies: 8
    Last Post: 2nd April 2008, 23:37
  5. Qt Eclipse integration problem!!!!
    By mismael85 in forum Installation and Deployment
    Replies: 4
    Last Post: 13th March 2008, 14:45

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.