[eclipse-poky] How to add a library to Eclipse with Yocto Plugin?

Ang, Chin Huat chin.huat.ang at intel.com
Sun Jan 28 23:01:02 PST 2018


Hi Andrey,

This is not specific to Eclipse Poky plugins, you'll need to configure autotools project to build against the library that you need.

Based on your code snippet, adding these lines to configure.ac did the trick for me, although YMMV depending on the libraries you're using or how you wish to build against them:


AC_SEARCH_LIBS([dbminit], [gdbm_compat], [], [

  AC_MSG_ERROR([Can't find gdbm_compat library])

])


Be sure to reconfigure the project before rebuilding.

--Chin Huat

________________________________
From: eclipse-poky-bounces at yoctoproject.org [eclipse-poky-bounces at yoctoproject.org] on behalf of Andrey Samarin [andreyur0lt at gmail.com]
Sent: Saturday, January 27, 2018 3:14 AM
To: eclipse-poky at yoctoproject.org
Subject: [eclipse-poky] How to add a library to Eclipse with Yocto Plugin?

Hello everyone


I do not know if I chose the mailing list correctly. If wrong - please redirect me.

I was faced with the fact that I can not add libraries to the project. Googling did not help. Questions on the Stackoverflow also did not help.
I duplicate the question here:


I'm using Yocto 2.3.1 under Ubuntu. I create image for Raspebrry Pi 3 without any problem. I install Eclipse and yocto-plugin for Eclipse. I create HelloWorld Autotools project and debug it on target hardware - no problems. But, when I try to add some library, besides standart stdlib.h and stdio.h, I get "undefined reference to 'name'" Where I can add a library to Eclipse with Yocto Plugin? I can't find this place!

Source: %)

#include <stdlib.h>
#include <stdio.h>
#include <dbm.h>

int main(void){
 char fn = "someFile";
 dbminit(&fn);
 return 0;
}

Toolchain Root Location: /opt/poky/2.3.1/

Sysroot Location: /opt/poky/2.3.1/sysroots/cortexa7hf-neon-vfpv4-poky-linux-gnueabi

(I'm using SDK for my image)

Thanks in advance.

https://stackoverflow.com/questions/48133444/yocto-project-how-to-add-a-library-to-eclipse-with-yocto-plugin?rq=1


Regards, Andrey.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/eclipse-yocto/attachments/20180129/5e4125a6/attachment.html>


More information about the eclipse-yocto mailing list