xcode 4 culdn't compile openCL app
I try to compile openCL app on Xcode 4, but I'm not success. I create new C language project, then add openCL framework, create necessary .c and .cl files, and try compile. Here is the error:
error: can't exec '/System/Library/Frameworks/OpenCL.framework/Libraries/openclc' (N开发者_开发百科o such file or directory)
I try googling, but unsuccess. Can anyone help me? Thanks.
That error pops up when xcode tries to compile the .cl files. These files are usually compiled at run-time using the clCreateProgramWithSource function. You can get rid of that error by removing the .cl files from the "Compile Sources" sections of the "Build Phases" of the target. Here is what you do:
- Select the Project in the Project Navigator.
- Select the target.
- Click on the Build Phases tab on the top.
- Expand the Compile Sources section.
- Select the .cl files and click the "-" button
- Run your program.
That should get rid of the error.
-Umar
精彩评论