Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. How to resolve this warning

How to resolve this warning

Scheduled Pinned Locked Moved Unsolved C++ Gurus
4 Posts 2 Posters 930 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    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?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by fcarney
      #2
      QtAndroid::androidActivity().callMethod<jvoid>("Init", "()V");
      

      Does this work?

      Edit:
      https://cdn2-ecros.pl/event/codedive/files/presentations/2017/code%20dive%202017%20-%20Michal%20Los%20-%20When%20C%2B%2B%20wants%20to%20meet%20Java.pdf

      C++ is a perfectly valid school of magic.

      1 Reply Last reply
      0
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        undeclared indentifier jvoid

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by
          #4

          @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

          C++ is a perfectly valid school of magic.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved