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. Compile QtOpenCl.dll with Qt (64bit)
Forum Updated to NodeBB v4.3 + New Features

Compile QtOpenCl.dll with Qt (64bit)

Scheduled Pinned Locked Moved Installation and Deployment
49 Posts 2 Posters 17.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #30

    You can use Qt Creator built in dialog for that.

    Or add

    @
    LIBS += -Lpath/to/sdk/ -lOpenCL
    @

    If you want to be independent from the SDK installation path, you can use the environment variables to generate the proper path

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • M Offline
      M Offline
      morflink
      wrote on last edited by
      #31

      well, thank you so far... now the compiler says:
      @NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.EXE"": Rückgabe-Code "0x49d"
      Stop.
      NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.exe"": Rückgabe-Code "0x2"
      Stop.
      NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
      Stop.
      NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
      Stop.@

      i just added the following:
      @LIBS += -LC:/Program Files (x86)/AMD APP SDK/2.9/lib/x86_64 -lOpenCL@

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #32

        Spaces are really bad on windows

        try

        @LIBS += -L$$quote("C:/Program Files (x86)/AMD APP SDK/2.9/lib/x86_64"@

        If that doesn't work, use the 8.3 naming scheme

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          morflink
          wrote on last edited by
          #33

          if i just use this advice, i get the same errors like i got at the very beginning.
          then i tried to copy paste the whole folder to another path without spaces and get still the same errors.
          8.3 naming scheme means to give the files in particular like ?:

          @LIBS += -L$$quote("C:/Program Files (x86)/AMD APP SDK/2.9/lib/x86_64/libOpenCL.a") -lOpenCl@

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #34

            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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • M Offline
              M Offline
              morflink
              wrote on last edited by
              #35

              i just checkd and saw that its PROGRA~2 cuz of the standard Programms folder and the x86 one but the errors dont change.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #36

                Can you post the current content of your pro file ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  morflink
                  wrote on last edited by
                  #37

                  @TEMPLATE = lib
                  TARGET = QtOpenCL
                  gcov {
                  CONFIG += staticlib
                  } else {
                  CONFIG += dll
                  }
                  CONFIG += warn_on
                  win32 {
                  DESTDIR = ../../bin
                  !static:DEFINES += QT_MAKEDLL
                  }
                  else:DESTDIR = ../../lib

                  win32 {
                  !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.h

                  SOURCES +=
                  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.cpp

                  PRIVATE_HEADERS +=
                  qclext_p.h

                  HEADERS += $$PRIVATE_HEADERS
                  DEFINES += QT_BUILD_CL_LIB

                  opencl_1_1 {
                  DEFINES += QT_OPENCL_1_1
                  }

                  @

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #38

                    Just to be sure I understand you correctly, you are again getting the missing symbols error ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      morflink
                      wrote on last edited by
                      #39

                      [quote author="SGaist" date="1402867816"]Just to be sure I understand you correctly, you are again getting the missing symbols error ?[/quote]

                      yes

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        morflink
                        wrote on last edited by
                        #40

                        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.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #41

                          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

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            morflink
                            wrote on last edited by
                            #42

                            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.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #43

                              Did you rebuild your old project from scratch ? Also check that you don't have a CONFIG += x86 somewhere in that project

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                morflink
                                wrote on last edited by
                                #44

                                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.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #45

                                  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 ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    morflink
                                    wrote on last edited by
                                    #46

                                    in the past i compiled the 32bit qtopencl libraries by the qtopencl project in qtcreator as described in the first post.
                                    i just was trying to do that for 64bit Qt in the same manner with a 64bit compiled qt 4.7.1.
                                    it just dont worked out.

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #47

                                      Strange, it looks like there's at least architecture mismatching somewhere

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        morflink
                                        wrote on last edited by
                                        #48

                                        if i get new hardware in the future i prolly will redo all this and maybe find the reason by comparision.
                                        anyways, thanks for your time and your help =)

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #49

                                          No problem, you're welcome !

                                          Happy coding ! :)

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          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