'How to compile a basic c file in yocto

I am working on yocto, I want to compile some C files in yocto and install the resulting binary to external filesystem. Before doing that I tried creating a separate reciepe and compile c code from it. I am unable to compile it.



Solution 1:[1]

You can just go to the official documentation to find your answer.

In the chapter 7.3 Writting a New Recipe of the yocto mega-manual, the very first example is exactly is what you need (Single .c File Package (Hello World!)).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1