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 openglgreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = occQt
TEMPLATE = appFORMS +=
occQt.uiSOURCES += main.cpp
occQt.cpp
OccView.cppHEADERS +=
occQt.h
OccView.hINCLUDEPATH = 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.libunix: LIBS += -lTKernel -lTKMath -lTKBrep -lTKTopAlgo -lTKPrim -lTKBO -lTKOffset -lTKService -lTKV3d -lTKOpenGl -lTKFillet
RESOURCES +=
occqt.qrc -
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.libYes 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.
-
@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.