Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. error C2872: 'IAccessible' : ambiguous symbol

error C2872: 'IAccessible' : ambiguous symbol

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiodebugginghelpquestion
3 Posts 3 Posters 0 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.
  • L Offline
    L Offline
    learningvisualc
    wrote on last edited by
    #1

    Hi all, when i compile my program i get this error

    C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\oleacc.h(53) : error C2872: 'IAccessible' : ambiguous symbol
    could be 'C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxwin.h(1336) : IAccessible'
    or 'e:\Program\debug\mso.tlh(2072) : Office::IAccessible'

    How can i resolve this Thanks in advance

    C _ 2 Replies Last reply
    0
    • L learningvisualc

      Hi all, when i compile my program i get this error

      C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\oleacc.h(53) : error C2872: 'IAccessible' : ambiguous symbol
      could be 'C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxwin.h(1336) : IAccessible'
      or 'e:\Program\debug\mso.tlh(2072) : Office::IAccessible'

      How can i resolve this Thanks in advance

      C Offline
      C Offline
      Cool_Dev
      wrote on last edited by
      #2

      this is because IAccessible is declared in both mso.tlh and afxwin.h. If you want to use IAccessible from mso.tlh, use it as Office::IAccessible. Or if you need to use IAccessible from afxwin.h, as it doesn't belongs to any namespace there, you have to modify the IAccessible from mso.tlh. You may use, rename("IAccessible", "msoIAccessible") soon after the #import "....\mso.tlh" statement.

      1 Reply Last reply
      0
      • L learningvisualc

        Hi all, when i compile my program i get this error

        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\oleacc.h(53) : error C2872: 'IAccessible' : ambiguous symbol
        could be 'C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxwin.h(1336) : IAccessible'
        or 'e:\Program\debug\mso.tlh(2072) : Office::IAccessible'

        How can i resolve this Thanks in advance

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        I'm guessing you're automating MS-Office. If so, use Office::IAccessible. Otherwise use ::IAccessible.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups