How to resolve this warning
Unsolved
C++ Gurus
-
Hi, this line of code
QtAndroid::androidActivity().callMethod<void>("Init", "()V");
causes the warning
warning: instantiation of function 'QAndroidJniObject::callMethod<void>' required here, but no definition is available note: forward declaration of template entity is here note: add an explicit instantiation declaration to suppress this warning if 'QAndroidJniObject::callMethod<void>' is explicitly instantiated in another translation unit
How can I to resolve it?
-
QtAndroid::androidActivity().callMethod<jvoid>("Init", "()V");
Does this work?
-
@mrdebug said in How to resolve this warning:
QtAndroid:
Wait, this is a warning and not an error?
Maybe a declaration to satisfy the template?:void QAndroidJniObject::callMethod(const char *methodName, const char *sig, ...) const;
I don't know if that is the right sig though:
https://doc.qt.io/qt-5/qandroidjniobject.html#callMethod-1