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



  • 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.


  • Moderators

    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).



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


  • Moderators

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



  • 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".


  • Moderators

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



  • 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



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



  • @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



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.