That did the trick. Didn't kown that one can use -fPIC vor archives. I always used it for shared librarys in the past.
Am Di. Nov. 22 21:51:41 2016 GMT+0100 schrieb Tone Kastlunger: > Recompile the mentioned library with the -fPIC > > On Tue, Nov 22, 2016 at 10:50 PM, george b <scooterschors...@gmail.com> > wrote: > > > This was may assumption. > > But when I try to combine the static library (libSwiften) within my qt > > app, I got the following error during linking: > > > > g++ -Wl,-O1 -Wl,-rpath,/usr/share/kaidan/lib -o kaidan main.o Kaidan.o > > RosterContoller.o RosterItem.o Persistence.o MessageController.o Database.o > > qrc_qml.o moc_Kaidan.o moc_RosterContoller.o moc_RosterItem.o > > moc_Persistence.o moc_MessageController.o moc_Database.o > > -L../swift-3.0/Swiften -L../../swift-3.0/3rdParty/Boost -lSwiften > > -lSwiften_Boost -lrt -lz -lssl -lcrypto -lxml2 -lresolv -ldl -lm -lc > > -lstdc++ -pie -rdynamic -L/usr/lib/ -lsailfishapp -lmdeclarativecache5 > > -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Sql -lQt5Core -lGLESv2 > > -lpthread > > /opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: > > ../swift-3.0/Swiften/libSwiften.a(CoreClient.o): > > relocation R_ARM_THM_MOVW_ABS_NC against `_ZN5Swift10CoreClient21handleMe > > ssageReceivedEN5boost10shared_ptrINS_7MessageEEE' can not be used when > > making a shared object; recompile with -fPIC > > ../swift-3.0/Swiften/libSwiften.a: error adding symbols: Bad value > > > > Any suggestions what went wrong? > > > > > > > > 2016-11-22 21:18 GMT+01:00 Andrey Kozhevnikov <coderusin...@gmail.com>: > > > >> of course you can static compile selected libraries only. > >> > >> ------ Исходное сообщение ------ > >> От: "george b" <scooterschors...@gmail.com> > >> Кому: "Sailfish OS Developers" <devel@lists.sailfishos.org> > >> Отправлено: 22.11.2016 23:05:17 > >> Тема: [SailfishDevel] Static build > >> > >> Hi > >> > >> I try to develop a xmpp client [1], based on libSwiften. A console > >> example compiled against a static Swiften lib works well. No I compiled > >> Swiften as a shared object, to combine it in a sailfish app. This way I got > >> a sasl error on runtime. Similar posts in different forums pointed out that > >> the error message results from a bug in a sasl library. I can work around > >> this problem using the static version of Swiften. > >> > >> Are there packages for static versions of qt and libsailfishapp > >> available, to be installed in the sdk? Or is there a possibility to combine > >> a static libraray archive with a sailfish application which uses shared > >> librarys? > >> > >> Regards > >> Georg > >> > >> [1] https://github.com/KaidanIM/Kaidan > >> > >> > >> _______________________________________________ > >> SailfishOS.org Devel mailing list > >> To unsubscribe, please send a mail to devel-unsubscribe@lists.sailfi > >> shos.org > >> > > > > > > _______________________________________________ > > SailfishOS.org Devel mailing list > > To unsubscribe, please send a mail to devel-unsubscribe@lists. > > sailfishos.org > > > _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org