Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to integrate winrt native code to the qt application for windows phone
QtWS25 Last Chance

How to integrate winrt native code to the qt application for windows phone

Scheduled Pinned Locked Moved Solved Mobile and Embedded
windows phonewindows rtwindows 8.1native codeqt 5.5.1
9 Posts 4 Posters 4.1k 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.
  • kranthiTK Offline
    kranthiTK Offline
    kranthiT
    wrote on last edited by
    #1

    Hi,
    we are implementing an application for windows 8.1 using qt for winrt. we need to use some device specific code i.e., winrt native code, we need to know the procedure of including libraries and include files for winrt platform to the qt application.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Isn't "winrt native code" just a C++ API with C++ header and libraries?
      If so then you can use it like any other C++ library (include header files and link against the libraries).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • kranthiTK Offline
        kranthiTK Offline
        kranthiT
        wrote on last edited by
        #3

        I tried adding the includespath and libs path. but iam unable to access the namespaces and classes of windows 8.1 phone api.

        jsulmJ 1 Reply Last reply
        0
        • kranthiTK kranthiT

          I tried adding the includespath and libs path. but iam unable to access the namespaces and classes of windows 8.1 phone api.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @kranthiT "iam unable to access the namespaces and classes" - what is the problem? Did you include needed header files in your code?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • kranthiTK Offline
            kranthiTK Offline
            kranthiT
            wrote on last edited by
            #5

            Hi,
            I, some how include all the required header files and libraries to the application, now it is showing the following error :
            collection.h requires the /ZW compiler option (I am using winrt collection api).
            when ever I tried to use the winrt api, it is throwing the error as "requires the /ZW compiler option".

            1 Reply Last reply
            0
            • jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Try to add QMAKE_CXXFLAGS += /ZW to your PRO file

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • patrikdP Offline
                patrikdP Offline
                patrikd
                wrote on last edited by
                #7

                hi all,
                I'm also currently running into a similar problem. I wanted to use some of the Windows::UI:Xaml functions. But I get an error from the Compiler: C1107 Assambly "Plattform.winmd" not found. Use /AI or define LIBPATH. But Setting /AI to the CXXFlags doesn't work and I have no idea what i should add to the LIBPATH.
                thx,
                patrik

                1 Reply Last reply
                0
                • kranthiTK Offline
                  kranthiTK Offline
                  kranthiT
                  wrote on last edited by
                  #8

                  yes, issue is resolved now. thanks for your response.

                  C 1 Reply Last reply
                  0
                  • kranthiTK kranthiT

                    yes, issue is resolved now. thanks for your response.

                    C Offline
                    C Offline
                    CMGeorge
                    wrote on last edited by
                    #9

                    @kranthiT Hi,

                    Do you have any example of ".pro" file on how you imported required libraries and headers?
                    I'm trying for some times to implement Push notification on Windows Phone, but i'm still stuck on allowing access of WinRT C++ classes from Qt

                    Thank yoy

                    iOS & Qt Developer
                    Happy Qt-ing

                    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