Altera_Forum
Honored Contributor
9 years agoCompletely Lost, Anyone Have Any Ideas?
Hello, I am sorry if this is in the wrong section. I am also very sorry if this is beating a dead horse.
I recently purchased a de0-nano-soc **couple days ago**. I have since been trying to figure how to to even USE it. I followed the startup guide... installed all SDK (i think??), I mean, I must of downloaded like 40gb work of files... i did not get a license yet tho, is this needed to even work? it wont let me register a license...let me say, i have prior experience in running and compiling opencl for the gpu...I am completely lost when it comes to programming a simple Hello World. I have downloaded every single SDK, followed all the tutorials, installed everything... and yet, I cant seem even compile the "hello world" example.I downloaded 2010 Express C++, and it would not even open up. I then just remade the project and imported everything, okay that works... i get this error now :
1>c:\users\home\desktop\fpga_opencl_hello_world\fpga_opencl_hello_world\main.cpp(161): error C2664: 'clCreateContext' : cannot convert parameter 4 from 'void (__cdecl *)(const char *,const void *,size_t,void *)' to 'void (__stdcall *)(const char *,const void *,size_t,void *)'1> This conversion requires a reinterpret_cast, a C-style cast or function-style cast ,p>okay...[\b] -- hours researching how to solve these issues, i just decided to do this: (in cl.h):
,p>
/* context apis */extern cl_api_entry cl_context cl_api_callclcreatecontext(const cl_context_properties * /* properties */, cl_uint /* num_devices */, const cl_device_id * /* devices */, void (cl_callback * /* pfn_notify */)(const char *, const void *, size_t, void *), //void * , void * /* user_data */, // ** added this ** cl_int * /* errcode_ret */) cl_api_suffix__version_1_0;great, now i get this:1>opencl.obj : error lnk2019: unresolved external symbol _clgetplatformids@12 referenced in function "struct _cl_platform_id * __cdecl aocl_utils::findplatform(char const *)" (?findplatform@aocl_utils@@yapau_cl_platform_id@@pbd@z)
im assuming i am missing some library. But WHO Knows???[/B]. any bones you can throw at me i would appreciate it... Worse comes to worse I will just install Linux as I found a nice tutorial to install everything.... Sorry for bad English. <p> <p> edit:4/8/2016 -- I have solved the problem with adding the following:<br>
#pragma comment( lib, "OpenCL" ) <p> And by building it in x64 using 2012 express (YOU CANT USE 2010) <p> However I now get this error when I run the hello world example... ERROR: Unable to find Altera OpenCL platform.