Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtOpenCL install problems with Qt 4.7 and Windows XP

QtOpenCL install problems with Qt 4.7 and Windows XP

Scheduled Pinned Locked Moved Installation and Deployment
17 Posts 9 Posters 12.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tadius
    wrote on last edited by
    #5

    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 directory C:/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 directory C:/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 directory C:/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]

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #6

      It is not -I (uppercase i) but -l (lowercase L) - the error occurs during linking.

      There is no path to your OpenCL lib in the command line. You should add it with -L like this in your .pro file:

      @
      LIBS += -L"c:\path\to\opencl\libdir"
      @

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tadius
        wrote on last edited by
        #7

        Thanks mr Volker. But how can i find the lib dir. I installed Nvidia Cuda toolkit 3.2.
        Do you mean the lib dir which contains "OpenCL.lib" file

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #8

          Yes, that is exactly the path to put after the -L

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tadius
            wrote on last edited by
            #9

            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.1

            What went wrong?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #10

              Now it's time to put OpenCL.dll near your exe.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • T Offline
                T Offline
                Tadius
                wrote on last edited by
                #11

                I doing exactly what you told me. It's require some more dll such as mingw100.dll and some Qt4 runtime dll almost done. I've tested with clinfo program but it's doesn't show up anything about my system device. It's just terminated in silent.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Tadius
                  wrote on last edited by
                  #12

                  QtOpenCL doesn't work on my XP system. Every examples are built, but them crashes?
                  What went wrong?

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #13

                    [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? ...?

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      Tadius
                      wrote on last edited by
                      #14

                      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.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sabrog
                        wrote on last edited by
                        #15

                        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.

                        QT - Apple QuickTime
                        Qt - Nokia's Qt Development Frameworks
                        Apple is a competitor of Nokia, so QT != Qt

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sabrog
                          wrote on last edited by
                          #16

                          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.

                          QT - Apple QuickTime
                          Qt - Nokia's Qt Development Frameworks
                          Apple is a competitor of Nokia, so QT != Qt

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mrad
                            wrote on last edited by
                            #17

                            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

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved