|
2010-08-15
, 23:38
|
Posts: 1,994 |
Thanked: 3,342 times |
Joined on Jun 2010
@ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
|
#432
|
@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!
|
2010-08-16
, 11:10
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#433
|
g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o plugin.o plugin.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o showdialogaction.o showdialogaction.cpp showdialogaction.cpp:16: warning: unused parameter 'parentWindow' /usr/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. plugin.h -o moc_plugin.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o moc_plugin.o moc_plugin.cpp /usr/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. showdialogaction.h -o moc_showdialogaction.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o moc_showdialogaction.o moc_showdialogaction.cpp rm -f libmbarcode_myplugin.so g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/usr/lib -shared -o libmbarcode_myplugin.so plugin.o showdialogaction.o moc_plugin.o moc_showdialogaction.o -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lQtCore -lpthread
|
2010-08-16
, 11:28
|
Posts: 1,994 |
Thanked: 3,342 times |
Joined on Jun 2010
@ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
|
#434
|
@Wikiwide: I believe it has something to do with putting all functions and headers into one .cpp file. I tried compiling your code with all classes and headers in one file and it failed to load. Separating them into their respective .cpp and .h files made the plugin compile and load without problems.
I did this with qmake and make, but I believe it should be possible to do this with g++ alone. The commands issued by qmake and make are as follows:
This of course includes some of Qt's moc stuff, which I'm not sure is needed for this example. I'm also unsure wether g++ will play along with all of Qt's macros without having qmake run together with make.Code:g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o plugin.o plugin.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o showdialogaction.o showdialogaction.cpp showdialogaction.cpp:16: warning: unused parameter 'parentWindow' /usr/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. plugin.h -o moc_plugin.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o moc_plugin.o moc_plugin.cpp /usr/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. showdialogaction.h -o moc_showdialogaction.cpp g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I../.. -I. -o moc_showdialogaction.o moc_showdialogaction.cpp rm -f libmbarcode_myplugin.so g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/usr/lib -shared -o libmbarcode_myplugin.so plugin.o showdialogaction.o moc_plugin.o moc_showdialogaction.o -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lQtCore -lpthread
I don't think that plugins for mbarcode are the easiest thing for testing whether or not Qt will play ball without qmake and suggest that you test these things out with simpler Qt examples first.
In any case, good luck!
The Following User Says Thank You to Wikiwide For This Useful Post: | ||
|
2010-08-16
, 13:14
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#435
|
|
2010-08-17
, 13:16
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#436
|
|
2010-08-17
, 13:56
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#437
|
The Following User Says Thank You to dragly For This Useful Post: | ||
|
2010-08-17
, 18:44
|
Posts: 252 |
Thanked: 252 times |
Joined on Nov 2009
|
#439
|
The Following User Says Thank You to dragly For This Useful Post: | ||
|
2010-08-17
, 21:19
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#440
|
@Wikiwide: I'm glad to hear that my post helped you
I've just tested installation of mbarcode now and it seems like the Recommends field in the deb package does nothing. In other words, all plugins, including the standard ones, have to be installed manually by the user - which is not very user friendly.
So the best solution is probably to bundle all the standard plugins into the main mbarcode package, like joshn53 suggested. I have done this now and just pushed an update version. Let's see if it works as expected
I've also set it to conflict with the old plugin packages, so that the user does not install them side-by-side with the bundled plugins.
As to bundling the plugins into the main app, this might be a good idea. I thought the app manager would install the plugins automatically when they are named in the "Recommends" field in the package. If there is no way to make this work, I'll look into bundling it all together.
@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!