valac says undef ref but libgee exists

391 Views Asked by At

When I try to compile a vala or genie program needing libgee, I get undefined references to gee_array_list_new, etc. I have libgee installed from source; its .so file is right there in plain sight in /usr/local/lib, its other files as they should be. But when I install libgee with my distro's package manager, the vala program links fine! I'm looking for a difference to explain this, but am stumped. The libraries are slightly different versions, but not by much.

Does valac somehow fail to look in /usr/local/lib? What are likely explanations?

1

There are 1 best solutions below

1
On BEST ANSWER

Most likely, you pkg-config --libs gee-1.0 doesn't include -L/usr/local/lib`.

Make sure you have PKG_CONFIG_PATH=/usr/local/lib/pkgconfig if you want valac to link with /usr/local/lib libraries.