LINUX.ORG.RU

Внешние библиотеки Qt 5

 , , , seriaport


0

1

написал приложение для работы с COM портами под linux, использовал либу QtSerialPort, собственно вопрос, как скомпилировать бинарник чтобы можно было пользоваться программой на другом ПК (где либа отсутствует), или что нужно прописать в pro файле чтобы можно было собранную либу таскать рядом с бинарником?

PS: статическая сборка qt не подходит.

PPS: система Arch Linux.

Ответ на: комментарий от pff_fail

я про второй ответ в теме, который

LIBS += -L/path/to -lpsapi
если что...

solovey ★★
()
Ответ на: комментарий от pff_fail

$ORIGIN and rpath

ld.so understands the string $ORIGIN (or equivalently ${ORIGIN}) in an rpath specification (DT_RPATH or DT_RUNPATH) to mean the directory containing the application executable. Thus, an application located in somedir/app could be compiled with gcc -Wl,-rpath,'$ORIGIN/../lib' so that it finds an associated shared library in somedir/lib no matter where somedir is located in the directory hierarchy. This facilitates the creation of «turn-key» applications that do not need to be installed into special directories, but can instead be unpacked into any directory and still find their own shared libraries.

http://man7.org/linux/man-pages/man8/ld.so.8.html

немного описания

wota ★★
()

Собери либу статикой, пейсатель ;)

erfea ★★★★★
()

#!/bin/sh
LD_LIBRARY_PATH=/install/path my_super_prog

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.