I think this is a simple problem but I can't figure it out. In Visual Studio you add an include directory, a library directory, and a dependency (OpenCL.lib) via the project properties dialog.
But in Qt Creator it lets you add an external library but it doesn't help you set up header files and typing the absolute path to the header file doesn't work. Adding the header file to the .pro
file doesn't seem to be working either.
So I add the external library
And then I try adding the path to the header file in INCLUDEPATH
:
INCLUDEPATH += $$PWD/../../../../../../Program Files (x86)/AMD APP/lib/x86
$$PWD/../../../../../../Program Files (x86)/AMD APP/include
This time the error it gives is:
But I have also received:
"Can't open File.obj" // this happens if I just add the External Library and then click build
"No such file or directory 'C:/Program Files (x86)/AMD APP/include/CL/cl.h'" // but that file does exist.
SOLUTION
For anyone that needs it the .pro file that eventually worked is
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = clTest100
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
win32:CONFIG(release, debug|release): LIBS += -Lc:/opencl/lib/x86/ -lOpenCL
else:win32:CONFIG(debug, debug|release): LIBS += -Lc:/opencl/lib/x86/ -lOpenCL
INCLUDEPATH += c:/opencl/include
DEPENDPATH += c:/opencl/include