Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Windows compilation problem
QtWS25 Last Chance

Windows compilation problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 52 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.
  • O Offline
    O Offline
    oliver_mpt
    wrote last edited by
    #1

    Hello,
    I have been using Qt for a long time now, but not for windows. I tried to recompile one of my apps (working well with linux and MacOS) for windows, so I configured a kit with Qt 6.5 LTS and MinGW (tried both MinGW11 and 13 that were installed by the Qt installation tool).
    I get errors like "variable CreateSyntheticPointerDevice definition is marked as dllimport" and the likes, several times. I spent some time looking on internet and trying to understand and decided to simplyfy the problem by generating a new empty Qt project, and I get the same compilation errors.
    The function CreateSyntheticPointerDevice is declared in winuser.h as :
    WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice( ....)
    Other functions marked as WINUSERAPI WINAPI does not seem to be problematic, so the problem could be linked to the HSYNTHETICPOINTERDEVICE marking.
    I don't know how to fix this, any help greatly appreciated ...

    JonBJ 1 Reply Last reply
    0
    • O oliver_mpt

      Hello,
      I have been using Qt for a long time now, but not for windows. I tried to recompile one of my apps (working well with linux and MacOS) for windows, so I configured a kit with Qt 6.5 LTS and MinGW (tried both MinGW11 and 13 that were installed by the Qt installation tool).
      I get errors like "variable CreateSyntheticPointerDevice definition is marked as dllimport" and the likes, several times. I spent some time looking on internet and trying to understand and decided to simplyfy the problem by generating a new empty Qt project, and I get the same compilation errors.
      The function CreateSyntheticPointerDevice is declared in winuser.h as :
      WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice( ....)
      Other functions marked as WINUSERAPI WINAPI does not seem to be problematic, so the problem could be linked to the HSYNTHETICPOINTERDEVICE marking.
      I don't know how to fix this, any help greatly appreciated ...

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote last edited by JonB
      #2

      @oliver_mpt said in Windows compilation problem:

      The function CreateSyntheticPointerDevice is declared in winuser.h as :

      I don't know but have a read through https://www.reddit.com/r/gcc/comments/u0q721/how_to_compile_a_shared_library_that_uses_types/ . That was from 3 years ago and said

      You'll need a very recent version of Mingw-w64. You'll also need to define NTDDI_VERSION to at least NTDDI_WIN10_RS5

      Maybe the discussion there will help for this particular issue? Also https://discuss.kde.org/t/kirigami2-for-developement-on-windows-rant/6333/16.

      If the error comes from Qt sources rather than your own I do not know why it does not run through and compile/link correctly. I do not use Windows for Qt.

      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