QtOpenCL install problems with Qt 4.7 and Windows XP
-
Dear All,
I am trying to install QtOpenCL to Qt 4.7 in Windows XP. The install procedures I used are as follows.
-
Download QtOpenCL source from http://qt.gitorious.org/qt-labs/opencl
-
Copy QtOpenCl files and directories in C:\Qt\opencl (Note: Qt 4.7 has been installed in C:\Qt\2010.04)
-
In Qt command prompt, go to C:\Qt\opencl and type qmake opencl.pro and then type mingw32-make
I got the following error messages.
C:\Qt\opencl>mingw32-make
cd src\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directoryC:/Qt/opencl/src' cd opencl\ && mingw32-make -f Makefile mingw32-make[2]: Entering directory
C:/Qt/opencl/src/opencl'
mingw32-make -f Makefile.Release
mingw32-make[3]: Entering directoryC:/Qt/opencl/src/opencl' g++ -c -O2 -Wall -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_MAKEDLL -DQT_BUILD_CL_LIB -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\2010.04\qt\include\QtCore" -I"..\..\..\2010.04\ qt\include\QtGui" -I"..\..\..\2010.04\qt\include" -I"..\..\..\2010.04\qt\include \ActiveQt" -I"release" -I"..\..\..\2010.04\qt\mkspecs\win32-g++" -o release\qclc ontext.o qclcontext.cpp qclcontext.cpp: In member function 'bool QCLContext::create(QFlags<QCLDevice::De viceType>)': qclcontext.cpp:169: error: invalid conversion from 'void (*)(const char*, const void*, size_t, void*)' to 'void (*)(const char*, const void*, size_t, void*)' qclcontext.cpp:169: error: initializing argument 4 of '_cl_context* clCreateCo ntext(const cl_context_properties*, cl_uint, _cl_device_id* const*, void (*)(con st char*, const void*, size_t, void*), void*, cl_int*)' qclcontext.cpp: In member function 'bool QCLContext::create(const QList<QCLDevic e>&)': qclcontext.cpp:212: error: invalid conversion from 'void (*)(const char*, const void*, size_t, void*)' to 'void (*)(const char*, const void*, size_t, void*)' qclcontext.cpp:212: error: initializing argument 4 of '_cl_context* clCreateCo ntext(const cl_context_properties*, cl_uint, _cl_device_id* const*, void (*)(con st char*, const void*, size_t, void*), void*, cl_int*)' mingw32-make[3]: *** [release/qclcontext.o] Error 1 mingw32-make[3]: Leaving directory
C:/Qt/opencl/src/opencl'
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directoryC:/Qt/opencl/src/opencl' mingw32-make[1]: *** [sub-opencl-make_default-ordered] Error 2 mingw32-make[1]: Leaving directory
C:/Qt/opencl/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2Could anyone inform me how to fix it?
Thanks,
-
-
Really strange errors. Problem in conversion between two identical types. Maybe problem in mingw somewhere?
-
Hiya Qt Newbie,
I'm seeing the same problem - QT 4.7 (release), QtOpenCL packages, compiled using MINGW on Windows XP. Exact same error.
I simply removed the callback function from the parameter list (replacing it with null which is apparently proper OpenCL) and the error went away - sadly other errors cropped up after "fixing" this one.
Have you found a solution?
-
Solution:
Change in qclcontextgl.cpp:
@
static void qt_clgl_context_notify(const char *errinfo,
const void *private_info,
size_t cb,
void *user_data)
@
with:
@
static void CL_API_CALL qt_clgl_context_notify(const char *errinfo,
const void *private_info,
size_t cb,
void *user_data)
@and in qclcontent.cpp:
@
static void qt_cl_context_notify(const char *errinfo,
const void *private_info,
size_t cb,
void *user_data)
@with:
@
static void CL_API_CALL qt_cl_context_notify(const char *errinfo,
const void *private_info,
size_t cb,
void *user_data)
@ -
After following the "fixing" problem as cisla wrote I get this error. It's mean can't find -IOpenCL
(I is uppercase of i). How to solve this problem:@
C:\Qt\2010.05\qt\OpenCL>mingw32-make
cd src\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directoryC:/Qt/2010.05/qt/OpenCL/src' cd opencl\ && mingw32-make -f Makefile mingw32-make[2]: Entering directory
C:/Qt/2010.05/qt/OpenCL/src/opencl'
mingw32-make -f Makefile.Debug all
mingw32-make[3]: Entering directoryC:/Qt/2010.05/qt/OpenCL/src/opencl' g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel oc -shared -mthreads -Wl -Wl,--out-implib,..\..\bin\libQtOpenCL.a -o ..\..\bin\Q tOpenCL.dll object_script.QtOpenCL.Debug -L"c:\Qt\2010.05\qt\lib" -L"c:\Qt\2010 .05\qt\lib" -lOpenCL -lQtGuid4 -lQtCored4 c:/qt/2010.05/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lOpenCL collect2: ld returned 1 exit status mingw32-make[3]: *** [..\..\bin\QtOpenCL.dll] Error 1 mingw32-make[3]: Leaving directory
C:/Qt/2010.05/qt/OpenCL/src/opencl'
mingw32-make[2]: *** [debug-all] Error 2
mingw32-make[2]: Leaving directoryC:/Qt/2010.05/qt/OpenCL/src/opencl' mingw32-make[1]: *** [sub-opencl-make_default-ordered] Error 2 mingw32-make[1]: Leaving directory
C:/Qt/2010.05/qt/OpenCL/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2
@[EDIT: code highlighting / Volker]
-
Thanks mr Volker again. At this time it compiled successfully. But it've try every example include with QtOpenCL, whole them crash.
My spec is :
NVdia 9500GT 1GB
Dirver ver 260.99 (Supported OpenCL following by NVidia website)
Windows XP Sp3.
QT 4.7.1What went wrong?
-
[quote author="Tadius" date="1294390789"]QtOpenCL doesn't work on my XP system. Every examples are built, but them crashes?
What went wrong?
[/quote]This question is something like: My car is out of order, how can I repair it.
Please be morre precisely, What exaclty happens? Which error/crash messages do you get? Can you debug it? You are using mingw, is QtOpenCL also compiled with the same compiler? ...?
-
I'm using Qt from QtSDK for Windows. It comes with MinGW.
1.Example "Colorize" and "Blur" ran but after I quit these program ,they were crashed.
Messages is "An unhandle Win32 exception occurred in colorize [3928]" because I've installed Visual Studio 2008 on same machine with Qt SDK 2010.05 (ver 4.7.1 - MinGW).2.clinfo - for displaying infor about my devices run. But doesn't show up anything. It quits with Error code 0. I've try comment out all the code in scope main() to make it like this
[quote]
//include some header of QtOpenCL or OpenCL header file
#include <conio.h>
int main(int argc,char *argv[])
{
/*I comment all code of original clinfo.cpp file */
getch();
return 0;
}
[/quote]
I save it and recompile and then launch it. It returned immediately without waiting for user press a key. That means something went wrong when including the header of QtOpenCL but I don't know.
Some one can tell me why? And how to solve this problem. -
I have same problems. If i run bezierpatch demo in QtCreator i see in console:
@
QCLContextGL::create: do not know how to enable sharing
QtOpenGL: Resources are still available at program shutdown.
This is possibly caused by a leaked QGLWidget,
QGLFramebufferObject or QGLPixelBuffer.
@Only debug version worked for me, but also crashed at close. But debug version don't run under gdb, segmentation fault at runtime.
Problems with utils like clinfo i solve by adding "CONFIG += console" to .pro files. printf doesn't work for windows if programs don't compiled as "console" application.
-
Something wrong inside QApplication and QApplication::exec()/QCoreApplication::exec(). With QCoreApplication and without call main event loop application run and exit without crashes, but with QApplication and without call main event loop application also crashes. Maybe something bad inside event loop.
-
Following instructions on this page I succeeded in building qtopencl on windows 7/64 bit but when I run the colorize example I get:
QCLProgram::build: "CL_BUILD_PROGRAM_FAILURE"
"C:\Users\name\AppData\Local\Temp\OCL6154.tmp.cl(41): warning: global
variable declaration is corrected by the compiler to have addrSpace
constant
const sampler_t samp = CLK_ADDRESS_CLAMP_TO_EDGE |
^Error:E014:Images not currently supported!
QCLContext::createImage2DCopy: "CL_INVALID_OPERATION"
Has anybody suggestions on that?
Thanks