Compile QtOpenCl.dll with Qt (64bit)
-
No, the path itself and don't add the library name since you also pass the -lOpenCL option.
@LIBS += -LC:/PROGRA~1/AMDAPP~1/2.9/lib/x86_64@
Please check the both on the command line with dir /x
-
Can you post the current content of your pro file ?
-
@TEMPLATE = lib
TARGET = QtOpenCL
gcov {
CONFIG += staticlib
} else {
CONFIG += dll
}
CONFIG += warn_on
win32 {
DESTDIR = ../../bin
!static:DEFINES += QT_MAKEDLL
}
else:DESTDIR = ../../libwin32 {
!isEmpty(QMAKE_INCDIR_OPENCL) {
QMAKE_CXXFLAGS += -I$$QMAKE_INCDIR_OPENCL
}
!isEmpty(QMAKE_LIBDIR_OPENCL) {
LIBS += -L$$QMAKE_LIBDIR_OPENCL
}
!isEmpty(QMAKE_LIBS_OPENCL) {
LIBS += $$QMAKE_LIBS_OPENCL
} else {
LIBS += -lOpenCL
}
}macx:!opencl_configure {
LIBS += -framework OpenCL
}LIBS += -LC:/PROGRA~2/AMDAPP~1/2.9/lib/x86_64
HEADERS +=
qclbuffer.h
qclcommandqueue.h
qclcontext.h
qcldevice.h
qclevent.h
qclglobal.h
qclimage.h
qclimageformat.h
qclkernel.h
qclmemoryobject.h
qclplatform.h
qclprogram.h
qclsampler.h
qcluserevent.h
qclvector.h
qclworksize.hSOURCES +=
qclbuffer.cpp
qclcommandqueue.cpp
qclcontext.cpp
qcldevice.cpp
qclevent.cpp
qclimage.cpp
qclimageformat.cpp
qclkernel.cpp
qclmemoryobject.cpp
qclplatform.cpp
qclprogram.cpp
qclsampler.cpp
qcluserevent.cpp
qclvector.cpp
qclworksize.cppPRIVATE_HEADERS +=
qclext_p.hHEADERS += $$PRIVATE_HEADERS
DEFINES += QT_BUILD_CL_LIBopencl_1_1 {
DEFINES += QT_OPENCL_1_1
}@
-
Just to be sure I understand you correctly, you are again getting the missing symbols error ?
-
maybe this is an interessting information...
i just used the 32bit Qt 4.7.1 and the compiled qtopencl libraries... is it possible that there are just older files or installations of whatsoever which causes failures like that?
i simply followed the instructions and maybe this is a reason why is just dont work out as it should. -
This is interesting indeed, you are compiling a 32 bit version of QtOpenCL but you are linking to the 64 bit library. Either rebuild Qt in 64 bit or link to the 32 bit OpenCL libraries
-
what i wanted to say was, that i used 32bit Qt and opencl1.2 in the past.
i just hope this is no misunderstanding, as i just wrote this down in the very first post.
i alrdy compiled 4.7.1 64bit and it works. what i just tried for now, is getting my older sourcecode work on 64bit, what also needs new QtOpenCL libraries. -
Did you rebuild your old project from scratch ? Also check that you don't have a CONFIG += x86 somewhere in that project
-
i have nothing like config += x86 in any of the pro files.
but i just works now.
i took QtOpenCL libraries and a few dlls more (opencl.dll, qtopencl.dll qtgui4.dll, qtcore4.dll, msvcp100.dll and msvcr100.dll) from a friend and everything is fine now.
regardless, i cant compile the clinfo.pro nor the rest of the qtopencl project.
just sad that i cant understand whats going wrong here. -
How did you compile QtOpenCL itself ? Command line or Qt Creator ? In the second case, did you perhaps configure it with a Kit using a 32bit Qt ?
-
Strange, it looks like there's at least architecture mismatching somewhere
-
No problem, you're welcome !
Happy coding ! :)