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. Can I use 'Windows Template Library' in Mac qt project
Forum Updated to NodeBB v4.3 + New Features

Can I use 'Windows Template Library' in Mac qt project

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 796 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    Princein
    wrote on last edited by
    #1

    Hi:
    I developed a project in Mac Qt which transplanted from windows qt, in my project,it shows error:
    use of undeclared identifier 'wglGetCurrentContext' , and I know 'wglGetCurrentContext' method belong to the GDI API which in windows platform.
    I search in my mac, and I found the 'wglGetCurrentContext' method in the atlapp.h which path is '/Users/lee/Qt5.11.3/5.11.3/Src/qtwebengine/src/3rdparty/chromium/third_party/wtl/include/atlapp.h' in Qt directory, in the top of atlapp.h file I found the statements:

    // Windows Template Library - WTL version 8.0
    // Copyright (C) Microsoft Corporation. All rights reserved.
    //
    // This file is a part of the Windows Template Library.
    // The use and distribution terms for this software are covered by the
    // Microsoft Permissive License (Ms-PL) which can be found in the file
    // Ms-PL.txt at the root of this distribution.

    so I know the atlapp.h is a part of Windows Template Library, now I have a question :
    can I use the Windows Template Library in my mac qt project for develope a mac app?

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

      Hi,

      AFAIK, no, it's only for Windows.

      Out of curiosity, why would you use WTL since you are currently using Qt for it's cross-platform capabilities.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        AFAIK, no, it's only for Windows.

        Out of curiosity, why would you use WTL since you are currently using Qt for it's cross-platform capabilities.

        P Offline
        P Offline
        Princein
        wrote on last edited by
        #3

        @SGaist
        thanks for your reply!

        I am a new employee of the company, taking over projects from colleagues who develop windows, the company let me develop the project for mac paltform base on the windows qt project.

        is there any website teaches us how to develop from windows porting project to mac?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Since you are using Qt, you already have at least the GUI which is cross-platform. Therefore, what part of the application exactly do you think needs porting ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply
          1
          • SGaistS SGaist

            Since you are using Qt, you already have at least the GUI which is cross-platform. Therefore, what part of the application exactly do you think needs porting ?

            P Offline
            P Offline
            Princein
            wrote on last edited by
            #5

            @SGaist

            thanks a lot!

            I am a new employee of the company, taking over projects from colleagues who develop windows, the company let me develop the project for mac platform base on the windows qt project. but the the windows qt project had include the <windows.h>,
            now I had to fix it on mac, it is not easy, so I ask for any website teaches us how to develop from windows porting project to mac.

            aha_1980A 1 Reply Last reply
            0
            • P Princein

              @SGaist

              thanks a lot!

              I am a new employee of the company, taking over projects from colleagues who develop windows, the company let me develop the project for mac platform base on the windows qt project. but the the windows qt project had include the <windows.h>,
              now I had to fix it on mac, it is not easy, so I ask for any website teaches us how to develop from windows porting project to mac.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Princein said in Can I use 'Windows Template Library' in Mac qt project:

              so I ask for any website teaches us how to develop from windows porting project to mac.

              The first thing to find out, is why he included windows.h, i.e. which Windows API is used and for what (and if that is still needed).

              Once you know that, you can look if you can use Qt for these functions, which would make it automatically cross-platform. If you cannot use Qt, then you have to re-write the code using macOS-API.

              There is not general rule to follow, it really depends which Windows API is used.

              Regards

              Qt has to stay free or it will die.

              1 Reply Last reply
              1

              • Login

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