PDA

View Full Version : PIR-1 Linux SDK Issues



douglasak
July 12th, 2015, 10:32 PM
I'm trying to use the PIR-1 SDK on Linux (Raspberry Pi) and am having some issues.

1. When I run make under pirlib2_example, I get the following error:

g++ -std=c++0x -Wall -I../PIRLIB2 -c ../PIRLIB2/pir.cpp -o ../PIRLIB2/pir.o
../PIRLIB2/pir.cpp:105:18: error: no ‘bool PIR::stopIR()’ member function declared in class ‘PIR’
Makefile:34: recipe for target '../PIRLIB2/pir.o' failed
make: *** [../PIRLIB2/pir.o] Error 1

2. If I add the stopIR() in pir.h, then I get the following error:

g++ ../PIRLIB2/buttonparser.o ../PIRLIB2/iparser.o ../PIRLIB2/irreceiveparser.o ../PIRLIB2/irsend.o ../PIRLIB2/manager.o ../PIRLIB2/pir.o ../PIRLIB2/pirlib2.o ../PIRLIB2/sendirparser.o ../PIRLIB2/boolsig.o ../PIRLIB2/ipir.o ../PIRLIB2/irlearnparser.o main.o ../PIRLIB2/hidlinux.o ../PIRLIB2/pt.o -lusb-1.0 -lrt -ludev -o pir_example
/usr/bin/ld: ../PIRLIB2/pir.o: undefined reference to symbol 'pthread_join@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Makefile:37: recipe for target 'pir_example' failed
make: *** [pir_example] Error 1

3. If I add -lpthread under the LDFLAGS in the Makefile, then the program compiles successfully.

4. However, the software does not detect my hardware (works fine in Girder). When I run pir list, I get the following:

pi@raspberrypi ~/PIRLIB2/src/pirlib2_example $ ./pir_example list
PIR-1:
PIR-4:

Am I doing something wrong? I'm just trying to get the SDK running, so I can then customize it. Thanks for all your help.