Including generic file headers



  • Dear All,

    I've a difficulty with specifying the generic header files, Qt creator always complains about the "C:\Users...\Downloads\occQt-master\occView.h:16: error: C1083: Cannot open include file: 'OpenGl_GraphicDriver.hxx': No such file or directory"

    but interestingly in source files when I hit CTRL+Space intellisense proposes "OpenGl_GraphicDriver.hxx" code completion, based on that I believe that Qt knows the location of that files but grudgingly keeps denying that can not find it

    Your helps will be appreicated!

    Content of PRO file
    QT += core gui opengl

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = occQt
    TEMPLATE = app

    FORMS +=
    occQt.ui

    SOURCES += main.cpp
    occQt.cpp
    OccView.cpp

    HEADERS +=
    occQt.h
    OccView.h

    INCLUDEPATH = C:/OpenCASCADE6.8.0\opencascade-6.8.0/inc

    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKernel.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKMath.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKBRep.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKTopAlgo.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKPrim.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKBO.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKOffset.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKService.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKV3d.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKOpenGl.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKFillet.lib

    unix: LIBS += -lTKernel -lTKMath -lTKBrep -lTKTopAlgo -lTKPrim -lTKBO -lTKOffset -lTKService -lTKV3d -lTKOpenGl -lTKFillet

    RESOURCES +=
    occqt.qrc


  • Moderators

    @Sonya

    To be precise, this is a compile error and not an error of Qt creator.

    is this the path where the header file can be found ?

    INCLUDEPATH = C:/OpenCASCADE6.8.0\opencascade-6.8.0/inc
    

    This path is different from places where you placed your libs?
    Is it correct that the drive letter is different?

    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKernel.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKMath.lib
    

    BTW you are using backward slashes as folder separators. Those are windows specific and typically Qt tools are not happy about those, because they are also used as end of line marker when a continuation line is follwoing. Better change those to forward slahses '/'.



  • Hi,

    INCLUDEPATH = C:/OpenCASCADE6.8.0\opencascade-6.8.0/inc

    yes that's the location of headers files, I've tried both options forward / backward slashes, but still the same complaint by the compiler.

    This path is different from places where you placed your libs?
    Is it correct that the drive letter is different?
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKernel.lib
    win32: LIBS += D:\OpenCASCADE6.8.0\opencascade-6.8.0\win32\vc12\libd\TKMath.lib

    Yes that's the different location , actually it is the legacy code and library location is the original writers location of library path, I didn't change it cause it doesn't seem to be causing the problem.


  • Moderators

    @Sonya
    I recommend to use forward slashes, because even though it is working you may face less side effects.

    Your INCLUDEPATH has a simply assign overwriting previous and possibly default assignments. Change to:

    INCLUDEPATH += C:/OpenCASCADE6.8.0/opencascade-6.8.0/inc
    

    In case you have another similar assignment in your pro-file, but further down, that might be the source of the problem.

    I did not see the first time, there is also a backward slash in the include path. Change that for sure.

    Also you can check the assignment to INCLUDEPATH

    INCLUDEPATH += C:/OpenCASCADE6.8.0/opencascade-6.8.0/inc
    message("my INCLUDEPATH  " $$INCLUDEPATH)
    


  • And don't forget to run qmake after you modify the .pro file, that will regenerate the makefiles with the correct paths.


Log in to reply
 

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