Reputation: 123
I have a layer which creates a shared library (libbbexample.so
) in usr/lib
directory in a distribution build by Yocto. The library contains several functions.
So I have created a new layer in which I have written a program which will use functions provided by libbbexample.so
.
File helloworld.c
:
#incude<stdio.h>
#include<bbexample.h>
int main()
{
int data;
data = get_data(); // this function is present in libbbexample.so
printf("data is %d",data);
return 0;
}
So I have tried bitbake the new layer, but I am getting the error "cannot find -libbbexample"
.
The contents of .bb files of new layer are as follows
do_compile() {
${CC} helloworld.c -o helloworld -libbbexample ${LDFLAGS}
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
I have set the following priority for layers:
libbbexample.so
) to 7.Thanks
Upvotes: 2
Views: 4937