Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use CComPtr CComQIPtr
Qt 6.12 LTS is out! See what's new in the release blog

How to use CComPtr CComQIPtr

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.4k 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.
  • V Offline
    V Offline
    verbin
    wrote on last edited by
    #1

    i wan't use CComPtr CComQIPtr, include atlbase.h
    But there are mistakes

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atldef.h:665: error: expected constructor, destructor, or type conversion before '(' token
    #define ATLPREFAST_SUPPRESS(x) __pragma(warning(push)) __pragma(warning(disable: x))
    ^

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atldef.h:666: error: expected constructor, destructor, or type conversion before '(' token
    #define ATLPREFAST_UNSUPPRESS() __pragma(warning(pop))
    ^

    C:\Qt\Qt5.11.1\Tools\mingw530_32\i686-w64-mingw32\include\mbstring.h:11: error: expected '}' before end of line

    C:\Qt\Qt5.11.1\Tools\mingw530_32\i686-w64-mingw32\include\mbstring.h:11: error: expected declaration before end of line

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, that particular error is easy to get rid of:

      // add this empty #define line before #including atlbase.h
      #define __pragma(x)
      #include "atlbase.h"
      

      Problem is that you're fighting an uphill battle by using MinGW for Microsoft specific stuff, you'll run into lots of other compiler errors, for example when I tried I got "#error Unsupported architecture"

      1 Reply Last reply
      0
      • V Offline
        V Offline
        verbin
        wrote on last edited by
        #3

        Too much trouble. I don't need intelligent CComPtr and ComQIPtr. I'd better manage the pointer by hand.

        Thank you all the same.

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