How to fix warning: attempt to free a non-heap object

@12345hhh, your question has nothing to do with OpenCL. And in the last post of yours I responded to, it appeared you hadn’t even investigated the OpenCL API return values. In another recent thread, you’re asking about how to use basic system build tools and how to link a basic C program.

These forums are for support using Khronos APIs such as OpenCL. They are not general “how to write code” forums.

Please go run through some C tutorials to become more proficient with writing, compiling, and debugging basic C programs first, and then return to OpenCL.

Then, for questions specifically about using Khronos APIs such as OpenCL, read:

for tips on composing your posts.