I think i doing it)
ldd /snap/bsp095project/x1/bin/CORE
linux-vdso.so.1 => (0x00007fff49344000)
libNetworkCommunication.so.0 => not found
libLogging.so.0 => not found
libUnitController.so.0 => not found
libTherapyRunnersController.so.0 => not found
libGenersControllerCommon.so.0 => not found
libQt5Widgets.so.5 => /snap/bsp095project/x1/QT/5.5/gcc_64/lib/libQt5Widgets.so.5 (0x00007ff2fea66000)
libQt5Network.so.5 => /snap/bsp095project/x1/QT/5.5/gcc_64/lib/libQt5Network.so.5 (0x00007ff2fe70c000)
libQt5Core.so.5 => /snap/bsp095project/x1/QT/5.5/gcc_64/lib/libQt5Core.so.5 (0x00007ff2fdfc6000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff2fdc44000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff2fda2d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff2fd664000)
libQt5Gui.so.5 => /snap/bsp095project/x1/QT/5.5/gcc_64/lib/libQt5Gui.so.5 (0x00007ff2fce52000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff2fcc34000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ff2fc9e1000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007ff2fc7df000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff2fc5d6000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff2fc2c5000)
libXext.so.6 => not found
libX11.so.6 => not found
libGL.so.1 => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff2fbfbb000)
libicui18n.so.54 => not found
libicuuc.so.54 => not found
libicudata.so.54 => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff2fbdb5000)
/lib64/ld-linux-x86-64.so.2 (0x0000564fd6557000)
libGL.so.1 => not found
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff2fbbac000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff2fb93b000)
I seen that he correctly sees the way to QT libraries. But he does not see where to look custom libraries.
Well, about the transfer to the script of these lines I understood.
But how correctly to specify here that for one version the program needs to be
LD_LIBRARY_PATH: $SNAP/usr/BTL/Simulation
and for another use this path?
LD_LIBRARY_PATH: $SNAP/usr/BTL/CommProtV200
Thanks for those details. The problem there is that snapcraft is creating a wrapper to make it simpler for getting certain applications working fine, and the content of that wrapper depends on which parts are being used to build the snap. As part of that, it’s setting $LD_LIBRARY_PATH so the binaries inside the snap can see their libraries in the expected path.
That’s why using run.sh will work: your run.sh will be called after snapcraft’s wrapper, so the path won’t be changed further.
All QT libraries and modules have $SNAP/QT.
/media/free/Qt/5.5/gcc_64/bin it’s where a have on my comp QT, but I do not know where it takes this path and puts it in snap.
in run.sh i have #setting for app
file $SNAP/bin/start_CORE_simulation.sh contain
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/BTL/:$SNAP/usr/BTL/Simulation/:$SNAP/QT/5.5/gcc_64/lib/"
file $SNAP/bin/start_CORE_hardware.sh contain
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/BTL/:$SNAP/usr/BTL/CommProtV200/:$SNAP/QT/5.5/gcc_64/lib/"
file $SNAP/bin/start_GUI.sh contain
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/BTL/:$SNAP/QT/5.5/gcc_64/lib/"
file $SNAP/bin/start_maintenance_hardware.sh contain
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/BTL/:$SNAP/QT/5.5/gcc_64/lib/"