executable no longer executes
-
i made an executable last year, tested it, emailed it, reinstalled os, had issues next change to program, so went back to previous version. it no longer executes the executable that was executable before reinstalling os. it now gives
error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
when started in konsole.
libQt5SerialPort.so.5 is is in two locations
dont know why an executable would need any lib files
-
@micha_eleric said in executable no longer executes:
it now gives
error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
when started in konsole.So the library is missing in all the places that the operating system will look for libraries. See ld.so.
libQt5SerialPort.so.5 is is in two locations
Neither of these is in a location .... See above.
dont know why an executable would need any lib files
This is because the executable was built using dynamic linking to Qt (the default and by far the easiest way).
-
@ChrisW67 said in executable no longer executes:
dont know why an executable would need any lib files
This is because the executable was built using dynamic linking to Qt (the default and by far the easiest way).
which means if executable is to be used on another computer, then all libraries have to be sent in same folder?
-
@micha_eleric If you dynamically link to any library then that library (or a compatible version) needs to be present on the target machine. Whether you need to ship it (e.g. a Qt library) or can rely on it already being there (e.g. a Windows C++ runtime) depends on the library.
-
@micha_eleric just put that library in the folder of your executable or add the path to the library folder in the system using export LD_LIBRARY_PATH = /path_to_lib
-
-
To make things portable on Linux, use an AppImage. We use a combination of linuxdeploy and linuxdeployqt to create the AppImage. Only downside: The Linux machine you are compiling on needs to be an older Linux version. linuxdeploy will deny operation on newer Linux versions. You might want to use a virtual machine (or Docker container) for that.
-