Date
1 - 8 of 8
Could not find glib.h
JH
Hi,
I added glib-2.0 to DEPENDS but it still could find the glib.h, what I could be missing here? fatal error: glib.h: No such file or directory | #include <glib.h> | ^~~~~~~~ | compilation terminated. Thank you. Kind regards, - jupiter |
|
Richard Purdie
On Wed, 2019-05-01 at 10:43 +1000, JH wrote:
Hi,You probably need to use pkg-config to find out which CFLAGS to use for glib-2.0... Cheers, Richard |
|
JH
Thanks Richard, where to run pkg-config? If I run pkg-config in the
toggle quoted message
Show quoted text
host, it pointed to host Ubuntu package which is different to the cross compiler. On 5/1/19, Richard Purdie <richard.purdie@...> wrote:
On Wed, 2019-05-01 at 10:43 +1000, JH wrote:Hi,You probably need to use pkg-config to find out which CFLAGS to use for |
|
Andreas Müller
On Wed, May 1, 2019 at 12:35 PM JH <jupiter.hce@...> wrote:
Maybe I missed something but there is not much information about what you are trying to build. Starts with build system: autotools / cmake / meson / qmake / waf? Is there a place to look into the recipe? That might make support easier. Andreas |
|
JH
Hi Andreas,
toggle quoted message
Show quoted text
It was my program, it has been compiled for weeks without any issues until I added an #include <glib.h>, despite the glib-2.0 was defined in the recipe, the do_compile() stopped at following errors, I can see glib-2.0 was built in build and image directory, I can see glib.h was in build and image directory, is it a basic principle if a package library was defined in DEPENDS, the bitback should automatically find the header files and library links? Why it still complained no such file? DEPENDS += "glib-2.0" RDEPENDS += "glib-2.0" do_compile() { oe_runmake -e } fatal error: glib.h: No such file or directory #include <glib.h> ^~~~~~~~ compilation terminated. Thank you. Kind regards, - jupiter On 5/1/19, Andreas Müller <schnitzeltony@...> wrote:
On Wed, May 1, 2019 at 12:35 PM JH <jupiter.hce@...> wrote:Maybe I missed something but there is not much information about what |
|
Burton, Ross <ross.burton@...>
On Wed, 1 May 2019 at 23:33, JH <jupiter.hce@...> wrote:
It was my program, it has been compiled for weeks without any issuesBecause that's not how glib works. https://developer.gnome.org/glib/stable/glib-compiling.html Ross |
|
Andreas Müller
On Thu, May 2, 2019 at 12:32 AM JH <jupiter.hce@...> wrote:
^ In case your program links successfully this can go you could write do_compile() { CFLAGS="${CFLAGS} `pkg-config --cflags glib-2.0`" LDFLAGS="${LDFLAGS} `pkg-config --libs glib-2.0`" oe_runmake -e } Or similar in your Makefile And and don't forget inherit pkgconfig in your recipe Andreas
|
|
JH
Thank you very much Andreas, that fixed it, so much to learn :-).
toggle quoted message
Show quoted text
Appreciate your helps. - jupiter On 5/2/19, Andreas Müller <schnitzeltony@...> wrote:
On Thu, May 2, 2019 at 12:32 AM JH <jupiter.hce@...> wrote:^ In case your program links successfully this can go |
|