Slide show c++ on target Raspberry

I have written a c++ program to show sequentially and randomly my large number of jpg images stored in different folders. The scope of the program is to overcame the many problems i met with the usual digital photo frames due to the too high numbers of photos i have to manage.
I wrote the program on my desktop Ubuntu and it works properly there.
I would now run the program on a target Raspberry computer, but I fail to compile it with
arm-linux-gnueabi-g++ -o FOTOSHOWarm SHOW4.cpp -lX11 -lpthread
(-lX11 -lpthread are requested by CImg (CImg Library is a small, open-source, and modern C++ toolkit for image processing) that I use to display the images)
because of the following error:
/usr/lib/gcc-cross/arm-linux-gnueabi/5/…/…/…/…/arm-linux-gnueabi/bin/ld: impossibile trovare -lX11
collect2: error: ld returned 1 exit status
Could Ubuntu MATE solve my problem??

Are you attempting cross compile? If so, and if possible, I’d recommend compiling on the RPI it self. If that is not an option and you must cross compile, I think you will need to have the armhf compiled versions of dependency libraries available to link against? Right? You can do this by popping your RPI sdcard into your pc and telling ld to use it’s ‘/usr/lib’ dir.

arm-linux-gnueabi-g++ -o FOTOSHOWarm SHOW4.cpp -L/mnt/$USER/SDCARD_LABEL/usr/lib -lX11 -lpthread

1 Like