groupgets / LeptonModule

Code for getting started with the FLIR Lepton breakout board
https://groupgets.com/manufacturers/flir/products/flir-lepton
BSD 2-Clause "Simplified" License
317 stars 197 forks source link

‘standard’ issue when trying to connect #81

Open qubolino opened 3 years ago

qubolino commented 3 years ago

just ordered pure thermal breakout and lepton 3.5 from groupgets but can't make it work with raspi4 nor raspi3

looks like i'm not the only one that faced it but none of the solutions worked for me.

any hint/pointer?

SoftwareArkitekt commented 3 years ago

I had this issue when trying to compile the raspberrypi_video program. If you are using a Debian based OS for your Raspberry Pi (like Raspbian), it is worth noting that Debian is usually a little behind current package releases in an attempt to keep things very stable. The default G++ compiler (v4.9.2 on my RPi) does not include "to_string" in the std library, which is something that was added later. (I've read that it could actually be a g++ bug, but in either case it doesn't work properly.)

The README instructions say to run qmake && make, but instead try doing this:

  1. cd to /LeptonModule/software/raspberrypi_video
  2. Run qmake by itself (creates a file called "Makefile" in the raspberrypi_video folder)
  3. Open "Makefile" in a text editor (such as vi, vim, nano, etc.)
  4. Go to line 15 where it defines the CXXFLAGS, and add "-std=c++11" in front. It should look like this: CXXFLAGS = -std=c++11 -pipe -02 -Wall -W -D_REENTRANT $(DEFINES)
  5. Save and exit the Makefile
  6. Now run your make command

That tells make to look at the C++ 11 std file, which has a to_string function the compiler can use.