# CUDA 5.0 on Linux with OpenCL linker problems

**URL:** <https://forums.developer.nvidia.com/t/cuda-5-0-on-linux-with-opencl-linker-problems/29049>\
**Category:** CUDA Setup and Installation\
**Created:** [April 14, 2013, 8:10am UTC](https://forums.developer.nvidia.com/t/cuda-5-0-on-linux-with-opencl-linker-problems/29049 "2013-04-14T08:10:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pettersson](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pettersson](https://forums.developer.nvidia.com/u/pettersson)\
**Post date:** [April 14, 2013, 8:10am UTC](https://forums.developer.nvidia.com/t/cuda-5-0-on-linux-with-opencl-linker-problems/29049/1 "2013-04-14T08:10:13Z")

</div>

Hi,

i’m just getting started with CUDA/OpenCL and already run into a problem. Even though I am linking the nvidia-opencl library, is still get missing symbols for e.g. clGetPlatformIDs. Do I have to link more than nvidia-opencl? I already tried several linking orders for the lib, with no success.

thanks for any hints  
pettersson

---

<div class="post-metadata">

**Author:** ![RyanLuo](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ryanluo/32/14047_2.png) [@RyanLuo](https://forums.developer.nvidia.com/u/RyanLuo)\
**Post date:** [April 17, 2013, 5:55am UTC](https://forums.developer.nvidia.com/t/cuda-5-0-on-linux-with-opencl-linker-problems/29049/2 "2013-04-17T05:55:24Z")

</div>

Can you please list explicitly compiling command? Meanwhile, it’s better to provide a sample code.

---

<div class="post-metadata">

**Author:** ![jbaksta](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jbaksta](https://forums.developer.nvidia.com/u/jbaksta)\
**Post date:** [April 18, 2013, 3:27pm UTC](https://forums.developer.nvidia.com/t/cuda-5-0-on-linux-with-opencl-linker-problems/29049/3 "2013-04-18T15:27:23Z")

</div>

I agree with ryluo on listing the command, and while not always required, it would be a good idea to mention your OS and perhaps your editor (Eclipse, VS, etc.).

Since all my programming is on Linux, my 2 cents would be to link against the OpenCL library from the driver as well (libOpenCL.so). That file is usually located in /usr/lib or /usr/lib64. Although I don’t believe libOpenCL.so contains any symbols. Again, the listing of the command with the associative error is very important.
