1

I'm new to Eclipse IDE. I'm currently getting started with gpio library for Raspberry Pi 3 which is mraa on Eclipse IDE as well as a cross - compiler for in Windows Operating System. Errors I've got while trying an example "hellomraa" from mraa library folder being depicted in attached screenshot. Those are

libmraa.so: undefined reference to 'fcntl@GLIBC_2.28'

libmraa.so: undefined reference to 'glob@GLIBC_2.27'

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Thanks in advance.

tmt
  • 11
  • 3

1 Answers1

0

You have to add the library in the settings of your project.

Let me explain you,

  • right click on hellomraa, then go in properties
  • In C/C++ Build select settings
  • Then in Tool Settings tab go under Cross GCC Linker then Libraries
  • Then add your library, with the green + you just type mraa not the lib prefix ! There is something to do it the library is .so you just type the name, if it is .a you have to add : before the library name
  • You also have to add the path to the library, in your case it is in your workspace

This should help you with an example

You may have to add your include path in Eclipse too, just go under inclues and put the path to your workspace where your mrra.h is.

Depending on which Eclipse version you are working on, you may have big trouble setting up a Cross-compilation / remote debug environment. I tried many version of Eclipse and only the last 2019-03 CDT version worked flawlessly for me…