We have moved to a new Sailfish OS Forum. Please start new discussions there.

# Compiling a plugin on the SDK.

More specifically This. It is a terminal plugin that i want to use for something i am tryng to make.

I added the plugin as a directory in my project. I tried adding dev packages added private stuff in QT += etc but i cant get it to compile. It gets stuck on this file and more specifically on the qsg stuff (include on top).

Any tips on how to proceed with this would be greatly appreciated. On the desktop it compiles fine in case it makes a difference.

Update: Tried to compile it in a directory -like i would on my desktop- by sshing into the emulator. After i installed gcc make and some other stuff still no go.

i get:

    enter code hereplugin/mono_text.cpp: In member function 'void MonoSGNode::setLatinText(const QString&, const QFont&, const QColor&)':
plugin/mono_text.cpp:81:82: error: no matching function for call to 'QSGContext::createGlyphNode(QSGRenderContext*&, bool)'
QSGGlyphNode *node = sgr->sceneGraphContext()->createGlyphNode(sgr, false);
^
plugin/mono_text.cpp:81:82: note: candidate is:
In file included from /usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgrenderer_p.h:56:0,
from plugin/mono_text.cpp:27:
/usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgcontext_p.h:174:27: note: virtual QSGGlyphNode* QSGContext::createGlyphNode(QSGRenderContext*)
virtual QSGGlyphNode *createGlyphNode(QSGRenderContext *rc);
^
/usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgcontext_p.h:174:27: note:   candidate expects 1 argument, 2 provided
plugin/mono_text.cpp: In member function 'void MonoSGNode::setUnicodeText(const QString&, const QFont&, const QColor&)':
plugin/mono_text.cpp:113:86: error: no matching function for call to 'QSGContext::createGlyphNode(QSGRenderContext*&, bool)'
QSGGlyphNode *node = sgr->sceneGraphContext()->createGlyphNode(sgr, false);
^
plugin/mono_text.cpp:113:86: note: candidate is:
In file included from /usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgrenderer_p.h:56:0,
from plugin/mono_text.cpp:27:
/usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgcontext_p.h:174:27: note: virtual QSGGlyphNode* QSGContext::createGlyphNode(QSGRenderContext*)
virtual QSGGlyphNode *createGlyphNode(QSGRenderContext *rc);
^
/usr/include/qt5/QtQuick/5.2.2/QtQuick/private/qsgcontext_p.h:174:27: note:   candidate expects 1 argument, 2 provided
make[2]: *** [.obj/mono_text.o] Error 1
make[2]: Leaving directory /home/nemo/Code/yat/qml/Yat'
make[1]: *** [sub-Yat-make_first] Error 2
make[1]: Leaving directory /home/nemo/Code/yat/qml'
make: *** [sub-qml-make_first-ordered] Error 2


:/

edit retag close delete

I don't do any QT development, but it looks like an API mismatch; the createGlyphNode as included only expects one argument - perhaps it uses different versions of this library for i386 and ARM?

( 2016-01-27 21:29:02 +0300 )edit

@Lomax No idea TBH. Thats why i need help. Its the first time i am trying to do any QT coding. I also tried -on the desktop- to remove the mono-text related files completely and while it compiled the related example app didn't start.

( 2016-01-27 21:55:36 +0300 )edit

(Disclaimer: maybe I understand your question totally wrong or this comment is totally irrelevant because I did Qt coding, but haven't really tried C++). You may find some clues in the simpletorch project: https://github.com/d0b3rm4n/harbour-simpletorch/tree/6c1e36513269cc6f13921fd65ee7c5c222184fa8 (I used it to package the pause screenblanking functionality in my HuD app)

( 2016-01-27 23:03:02 +0300 )edit

( 2016-01-27 23:08:31 +0300 )edit

@lakutalo

any way to check?

( 2016-01-27 23:19:59 +0300 )edit

Sort by » oldest newest most voted

Not the exact answer to your question, but try to make it on your phone. Of course, prior to that you have to install all the needed dev-packages. In most cases this circumvents all the struggle with cross-compiling. Personally I succeeded much better this way. Especially make projects are quite stroppy with sf-SDK - my personal experience.

more

TBH i wan't to have something that works on the SDK. I don't wan't to mess with my everyday phone.

( 2016-01-25 13:56:48 +0300 )edit
1

I thought so, too. But I gave up. Works so well and doesn't really mess with the phone, as I have only used pkcon packages. If you need anything else, use /opt or /usr/local to temporary install it and keep track of it. I am thinking to use my µSD for all that stuff to keep the phone even tidier.

Anyway, if you get your SDK running with your make project, I am more than interested how you managed it!

( 2016-01-25 15:02:12 +0300 )edit