The -Wl,... arguments to g++ are passed on the the linker. For details of the rpath and rpath-link arguments see here: [Using LD, the GNU linker - Options](https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html\_node/ld\_3.html#:~:text=s' and `-S'.-,-rpath,-dir)
Member 14968771 wrote:
-shared -Wl,-soname,libHCI_VERSION_622.so.1 -o libHCI_VERSION_622.so.1.0.0 main.o mainwindow_hci_v_622.o moc_mainwindow_hci_v_622.o
-shared : create a shared runtime -necessary for producing a shared library (DLL in windows-speak) -Wl,-soname,libHCI... : see above document re -soname linker option The .o files are the object files to put in the shared library You are correct about the other libraries. They get picked up by rpath and rpath-link, so that when you use then libHCI_VERSION_6622 library, you do not have to add them to the link command line
Keep Calm and Carry On