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. How do you include OpenCL in a 32-bit application?
Qt 6.11 is out! See what's new in the release blog

How do you include OpenCL in a 32-bit application?

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 1.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.
  • D Offline
    D Offline
    dolphonebubleine
    wrote on last edited by
    #1

    I am trying to use OpenCL in a QT Project on my 64-bit windows machine.

    I am using the AMD APP 64-bit OpenCL SDK.

    But QT only builds 32-bit applications. I try to include OpenCL in my project and get linker errors:

    @// IF I BUILD WITH Microsoft Visual Compiler 11.0 (amd64):
    LNK2019: unresolved external symbol clGetPlatformIDs referenced in function main
    LNK1120: 1 unresolved externals

    // IF I BUILD WITH Microsoft Visual Compiler 11.0 (x86):
    LNK1112: module machine type 'x64' conflicts with target machine type 'X86'@
    I think the first errors are because the linker can't link 64-bit OpenCL with the 32-bit QT application. And the second error is because I can't use a 64-bit compiler to compile a 32-bit application. Is that right? I'm sure other people are using OpenCL with QT.

    ANSWER
    I finally figured this out (with some help).

    I installed QT 64-bit. Then I linked to OpenCL 64 bit (did not realize it but I was linked to 32 bit OpenCL before).

    I WOULD CLOSE THIS QUESTION BUT THERE IS NO OPTION. ALSO I WOULD HAVE POSTED THIS IN REPLY BUT I AM LOCKED OUT OF REPLY.

    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