0
$\begingroup$

Rosanswers logo

Hey all,

I've got a problem concerning the standard raspberry libraries. I'm trying to receive sensor data via a sensor shield specialized for raspberry pi and for that purpose the already succesfully included header-files are depending on +20 preinstalled raspberry libraries:

#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <time.h>
#include <termios.h> 
#include <ctype.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <algorithm>
#include <limits.h>
#include <pthread.h>
#include <poll.h>

So my question is now: Is there a fast and easy way to link/use these libraries or do I really have to wrap them all seperately?

Best Regards


Originally posted by bluhub on ROS Answers with karma: 1 on 2014-10-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Most of those are part of the standard library or stl and you won't have to link them explicitly. Some you will need to link explicitly like pthread. For example: https://stackoverflow.com/questions/1620918/cmake-and-libpthread


Originally posted by tfoote with karma: 58457 on 2014-10-01

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by bluhub on 2014-10-02:
can you provide a list or a source, where I can look up the libraries, that I have to link explicitly? or just trial and error..?

Comment by tfoote on 2014-10-02:
These are all from system libraries or the stl. you should look up what packages they come from and familiarize yourself with them and standard usage of them from their documentation. Googling each of them will give you a lot of information.

Comment by tfoote on 2014-10-02:
Undefined references are linking issues. You need to make sure you're linking against all the libraries you're using. I suggest looking at some more general references. This is not really a ROS question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.