Connecting Qt5 and eclipse ubuntu - no such file or directory



  • I try to connect my eclipse with Qt ( I cant use QtCreator -also doesnt work).

    I used qtdiag in console to find path, i got:

    HeadersPath: /usr/include/x86_64-linux-gnu/qt5
    
    LibrariesPath: /usr/lib/x86_64-linux-gnu
    

    I set:
    Properties>>C/C++ Build>>Settings>>GCC C++ Linker >> Libraries

    alt text

    Eclipse cannot build project and put:

    g++ -include/usr/include/x86_64-linux-gnu/gt5 -O2 -g3 -Wall -fmessage-length=0 -fPIC --std=c++11 -MMD -MP -MF"src/szpcpp6.d" -MT"src/szpcpp6.d" -o "src/szpcpp6.o" "../src/szpcpp6.cpp"
    
    /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:37:31: fatal error: QtGui/qwindowdefs.h: no such file or directory
    

    Directory and file /qt5/QtWidgets/qwidget.h exist and QtGui/qwindowdefs.h too.

    but it's my includes:

    #include <qt5/QtWidgets/qwidget.h>
    #include <qt5/QtWidgets/qapplication.h>
    

    I dont use qwindowdefs.h

    Any idea?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I don't remember using Eclipse and Qt together but from your screenshot and error line there seems to be two things wrong:

    1. You are setting the include paths in your library search path
    2. It seems you didn't set the include search path correctly

    Hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.