{"id":6149,"date":"2014-04-13T04:34:53","date_gmt":"2014-04-13T04:34:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/cannot-build-opencl-program-on-windows-collection-of-common-programming-errors\/"},"modified":"2014-04-13T04:34:53","modified_gmt":"2014-04-13T04:34:53","slug":"cannot-build-opencl-program-on-windows-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/cannot-build-opencl-program-on-windows-collection-of-common-programming-errors\/","title":{"rendered":"Cannot build OpenCL program on Windows-Collection of common programming errors"},"content":{"rendered":"<p>I have written a simple &#8220;do-nothing&#8221; OpenCL application (in C++ but using the C API) on Linux to get some data about OpenCL speed. It compiles fine and runs without error. I don&#8217;t have a graphics card that supports OpenCL, but I need to test it on a GPU. I&#8217;m trying to build the application on my friend&#8217;s Windows 7 64bit computer using the OpenCL implementation provided with NVIDIA&#8217;S CUDA Toolkit.<\/p>\n<p>When I try to link to the OpenCL.lib file in CUDA\\x64 I get undefined references for each OpenCL call within the program (using the standard C API). The same thing happens when I link to the OpenCL.dll in the system32 directory. If I link to the win32 library that came with the CUDA Toolkit, I don&#8217;t get errors, but OpenCL cannot acquire a platform. All the undefined references I get when linking have an @20 or @46 or some random number on the end of the symbol name. I&#8217;m not familiar enough with Windows development to know how to fix this problem. What could be my problem?<\/p>\n<p>I apoligize for any newbie-ness. Thanks for any answers!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have written a simple &#8220;do-nothing&#8221; OpenCL application (in C++ but using the C API) on Linux to get some data about OpenCL speed. It compiles fine and runs without error. I don&#8217;t have a graphics card that supports OpenCL, but I need to test it on a GPU. I&#8217;m trying to build the application [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6149","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6149"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6149\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}