GTK 3 Eclipse error while loading shared libraries: libgtk-3.so.0 - eclipse-cdt

I'm currently using Eclipse IDE for C/C++ Developers Version: 2018-09 (4.9.0) to build a simple GTK 3 app. But after I build and then run the app, in Eclipse, I get the following error:
Debug/Test: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
However, When I start the executable from a terminal, it starts just fine.
How can I resolve the shared library not found so I can run the app directly from within Eclipse?

Related

eclipse CDT: error while loading shared library

I have an eclipse c++ project with two shared libraries. I've included the names of the libraries and their paths under the project settings. The project builds fine, but I cannot run it:
error while loading shared libraries: libxxx.so.0.3.1: cannot open shared object file: No such file or directory
Do I have to set the ld_library_path variable to run the project in eclipse?
Do I have to set the ld_library_path variable if i want to run the application in the console?
Is there a method, i can use to avoid having to set the ld_library_path?

Using SFML in Eclipse (Linux)

I'm trying to get SFML (www.sfml-dev.org) running under Eclipse which is running on Ubuntu 16.04, my c++ compiler is nvcc as this is a cuda project. I have my includes and libraries set up as follows:
The project builds fine, but when I run it I get the error message:
error while loading shared libraries: libsfml-window.so.2.4: cannot open shared object file: No such file or directory
This is weird, because the file exists (/home/timo/cuda-workspace/CudaTutorial/SFML/lib). Does anyone know how I can resolve this issue?
Well, in the end creating a conf file did it:
gksudo gedit /etc/ld.so.conf.d/sfml.conf
/lib/SFML/lib
sudo ldconfig
(I put the SFML build into lib in case I want to use it in another project).

How to fix Error while loading shared libraries - when uusing eclipse share project

I'm using eclipse (& Linux).
In eclipse I have 2 C++ projects (in the same worksapce):
1. ShrPrj (which I compile as share library)
2. MainPrj (which is exe proj and it use the ShrPrj project)
I can compile those 2 projects,
but when I'm trying to run MainPrj I'm getting the following error:
error while loading shared libraries ShrPrj...
How can I setup & config the MainPrj eclipse project to load the share library (of the second eclipse project) ?
It seems that in the LD_LIBRARY_PATH I cant setreference to other project

QT Installer: error while loading shared libraries

I'm trying to set up the QT Installer following their manual (Im in Ubuntu):
https://doc.qt.io/qtinstallerframework/ifw-getting-started.html
I just compiled it with qmake and make commands and apparently without problems. The binaries were generated and none error message. But when I try to run any of the binaries files, I get this message:
"error while loading shared libraries: libinstaller.so.1: cannot open shared object file: No such file or directory"
I can see that libinstaller.so.1 is at the QT Installer lib folder. but I don't know how to link it.
$ls lib/
lib7z.a libinstaller.so.1 libinstaller.so.1.0.0
libinstaller.so libinstaller.so.1.0

Boost c++ shared object file on Linux an eclipse

I've finally managed to build my project using eclipse, c++ and boost but when I run the program I get:
~/workspace/HelloWorld/Debug/HelloWorld: error while loading shared libraries:
libboost_regex.so.1.54.0: cannot open shared object file: No such file or directory
Obviously I don't want it to link to such a specific version and if possible don't have shared libraries at all when building the file.
How do I use a more generic name even though I've installed the latest boost manually and/or can or should I link it statically into my binary instead?