Eric Jager
Eric Jager

Reputation: 31

bitbake: How to include .so build by one recipe into another recipe

How do I include a shared library in another bitbake recipe that makes use of a makefile to compile a program depending on the shared library?

So i have:

How do link the shared library to this small program?

Upvotes: 3

Views: 2998

Answers (1)

ɛIc_ↄIз
ɛIc_ↄIз

Reputation: 380

You need to set up proper dependency. If mylib.so is required to compile myprog, add package that supplies mylib.so to compile time dependencies of myprog.

Usually package name is the same as corresponding recipe's name, so if the recipe that produces mylib.so is named mylib_1.0.bb, add the following line to the recipe for myprog:

DEPENDS += "mylib"

If mylib.so is used only at runtime, use

RDEPENDS_${PN} += "mylib"

Upvotes: 1

Related Questions