QtOpenCL building problem with mingw (from QtSDK)

  • Hi there.

    I have read some forums but nothing helps me really, so i decide to ask here. I am using Win7 with the QtSDK (4.7.4 with mingw). I have also installed the nvidia cuda toolkit 4.0 to get all the opencl includes and libs. Now i have no Idea, how i should compile the QtOpenCL Module with the mingw. I followed this tut: http://doc.qt.nokia.com/opencl-snapshot/building.html but the Windows Building section is very little. When I type the folllowing lines at the cloned gitrepo: http://qt.gitorious.org/qt-labs/opencl


    than the includes and libs are not found:

    cd src\ && c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\qmake.exe c:\QtSDK\Desktop\Qt\QtOpenCL\src\src.pro -o Makefile
    cd src\ && mingw32-make -f Makefile
    mingw32-make[1]: Entering directory C:/QtSDK/Desktop/Qt/QtOpenCL/src' cd opencl\ && c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\qmake.exe c:\QtSDK\Desktop\Qt\QtOpenCL\src\opencl\opencl.pro -o Makefile cd opencl\ && mingw32-make -f Makefile mingw32-make[2]: Entering directoryC:/QtSDK/Desktop/Qt/QtOpenCL/src/opencl'
    mingw32-make -f Makefile.Debug
    mingw32-make[3]: Entering directory `C:/QtSDK/Desktop/Qt/QtOpenCL/src/opencl'
    g++ -c -g -Wall -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -
    T -I"......\4.7.4\mingw\include\QtCore" -I"......\4.7.4\mingw\include\QtGui"
    -I"......\4.7.4\mingw\include" -I"......\4.7.4\mingw\include\ActiveQt" -I"debug" -I"......\4.7.4\mingw\mkspecs\default" -o debug\qclbuffer.o qclbuffer.cpp
    In file included from qclevent.h:45,
    from qclmemoryobject.h:45,
    from qclbuffer.h:45,
    from qclbuffer.cpp:42:
    qclglobal.h:88:28: error: CL/cl_platform.h: No such file or directory
    qclglobal.h:89:19: error: CL/cl.h: No such file or directory

    Shall i set some systempathes ore something like that, to let them found?

    The second try was to install the msys and run the ./configure script to set the inlcude and lib pathes like the linux how to from the site discribed above. But when i run these one, it seems to start with compiling, but it have a problem with linking:

    $ ./configure -I/c/nvidia_cuda_toolkit/v4.0/include -L/c/nvidia_cuda_toolkit/v4.0/lib/x64 -lOpenCL -verbose

    This is the QtOpenCL configuration utility.

    opencl auto-detection... ()
    /bin/make.exe -f Makefile.Debug
    make.exe[1]: Entering directory /c/QtSDK/Desktop/Qt/QtOpenCL/config.tests/unix/ opencl' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NEEDS_QMAIN -I'/c/nvidia_cuda_toolkit/v4.0/include' -I'.' -I'.' -I'../../../ ../4.7.4/mingw/mkspecs/default' -o debug/opencl.o opencl.cpp g++ -mthreads -Wl,-subsystem,windows -o debug/opencl.exe debug/opencl.o -L/c/nv idia_cuda_toolkit/v4.0/lib/x64 -lOpenCL debug/opencl.o: In functionmain':
    c:\QtSDK\Desktop\Qt\QtOpenCL\config.tests\unix\opencl/opencl.cpp:53: undefined r
    eference to clGetPlatformIDs@12' c:\QtSDK\Desktop\Qt\QtOpenCL\config.tests\unix\opencl/opencl.cpp:54: undefined r eference toclCreateImage2D@36'
    collect2: ld returned 1 exit status
    make.exe[1]: *** [debug/opencl.exe] Error 1
    make.exe[1]: Leaving directory `/c/QtSDK/Desktop/Qt/QtOpenCL/config.tests/unix/o
    make.exe: *** [debug] Error 2
    opencl disabled.
    //the other detections have also problems while linking
    Qt version ............. 4.7.4
    qmake .................. /c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/qmake.exe
    OpenCL 1.0 ............. no
    OpenCL 1.1 ............. no
    OpenCL/OpenGL interop .. no
    Extra QMAKE_CXXFLAGS ...
    Extra INCLUDEPATH ...... /c/nvidia_cuda_toolkit/v4.0/include
    Extra LIBS ............. -L/c/nvidia_cuda_toolkit/v4.0/lib/x64 -lOpenCL

    Could not detect an OpenCL implementation ... aborting

    Are there any other possibilities to compile these project with mingw and set the pathes with win7? It will be really great if anyone can help me to solve this.

Log in to reply

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