Korzystam z OpenSUSE. Kompiluję własną bibliotekę z pomocą pkg-config i make. Jednak po skompilowaniu i uruchomieniu linker nie potrafi odnaleźć pewnych symboli:
>ld ./tao-Qt5.so.1.0
ld: warning: cannot find entry symbol _start; not setting start address
./tao-Qt5.so.1.0: undefined reference to `QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)'
./tao-Qt5.so.1.0: undefined reference to `QVBoxLayout::QVBoxLayout(QWidget*)'
./tao-Qt5.so.1.0: undefined reference to `QHBoxLayout::QHBoxLayout(QWidget*)'
./tao-Qt5.so.1.0: undefined reference to `QPushButton::QPushButton(QWidget*)
Mój makefile wygląda tak:
tao-module: main
gcc -g -shared -Wl,-soname,tao-Qt5.so.1 -o tao-Qt5.so.1.0 *.o `pkg-config --cflags Qt5Gui --libs Qt5Gui` `pkg-config --cflags Qt5Core --libs Qt5Core`
cp ./tao-Qt5.so.1.0 ..
main: *.cxx
g++ -g -fPIC -c [^p]*.cxx `pkg-config --cflags Qt5Gui --libs Qt5Gui` `pkg-config --cflags Qt5Core --libs Qt5Core`
Gdzie mogę znaleźć brakujące symbole?