Thread: mbarcode
View Single Post
Posts: 2,006 | Thanked: 3,351 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#432
Originally Posted by dragly View Post
@wikiwide: just as a note if you don't want to copy the compiled file into /usr, you may place your .so in /home/user/.config/mbarcode/plugins instead. I don't know why it doesn't work without qmake, and sadly, Qt isn't saying too much about why plugins won't load. I would suggest you make it work with qmake first, and then try to compile it by hand. Good luck!
It seems that -shared option of g++ just turns off all errors, ignores them. So I try to link without -shared option and look at errors.

EDIT: Now I use these commands.
g++ -c -pipe -O3 mb.cpp
g++ -Wl,-rpath-link,/usr/lib -L/usr/lib -lQtCore -lQtGui -lQtDBus -lpthread -lzbar -shared mb.o -o mb.so

It still says "Could not load"

When I remove -shared from the second line, it says "undefined reference to 'vtable for class'". If anybody knows how to resolve it, he is welcome (there are neither constructors nor destructors in the two classes).

Last edited by Wikiwide; 2010-08-16 at 06:05.