# Cannot find -lOpenCL

**URL:** <https://forums.developer.nvidia.com/t/cannot-find-lopencl/19485>\
**Category:** CUDA Programming and Performance\
**Created:** [October 29, 2010, 11:19pm UTC](https://forums.developer.nvidia.com/t/cannot-find-lopencl/19485 "2010-10-29T23:19:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andryle](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@andryle](https://forums.developer.nvidia.com/u/andryle)\
**Post date:** [October 29, 2010, 11:19pm UTC](https://forums.developer.nvidia.com/t/cannot-find-lopencl/19485/1 "2010-10-29T23:19:27Z")

</div>

I’m attempting to create and compile an OpenCL program outside of the SDK framework, using GCC under Cygwin on Windows XP. Upon initial compilation, I was receiving link errors, and a brief Google search seemed to indicate that I needed to add -lOpenCL to the build command. However, this now gives the error:  
/usr/lib/gcc/i686-pg-cygwin/3.4.4/…/…/…/…/i686-pc-cygwin/bin/ld: cannot find -lOpenCL

I have located the OpenCL.lib file in the NVIDIA GPU Computing SDK - where must I put it or what configuration settings must I modify to enable gcc to locate it at link-time?  
Thanks!

---

<div class="post-metadata">

**Author:** ![andryle](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@andryle](https://forums.developer.nvidia.com/u/andryle)\
**Post date:** [October 29, 2010, 11:19pm UTC](https://forums.developer.nvidia.com/t/cannot-find-lopencl/19485/2 "2010-10-29T23:19:27Z")

</div>

I’m attempting to create and compile an OpenCL program outside of the SDK framework, using GCC under Cygwin on Windows XP. Upon initial compilation, I was receiving link errors, and a brief Google search seemed to indicate that I needed to add -lOpenCL to the build command. However, this now gives the error:  
/usr/lib/gcc/i686-pg-cygwin/3.4.4/…/…/…/…/i686-pc-cygwin/bin/ld: cannot find -lOpenCL

I have located the OpenCL.lib file in the NVIDIA GPU Computing SDK - where must I put it or what configuration settings must I modify to enable gcc to locate it at link-time?  
Thanks!
