dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: oleacc link issues

  1. #1
    Join Date
    Dec 2004
    Location
    Leamington Spa, UK
    Posts
    202

    oleacc link issues

    Greetings!

    I am trying to implement the Active Accessibility capabbilities to my ATL ActiveX control.I have added

    #include <Initguid.h>
    #include <oleacc.h>
    #include <winable.h>

    and the paths to where oleacc.lib AND oleacc.dll are present in the settings of VS 2003. However I am getting the following errors when I try to compile.

    Knob.obj : error LNK2001: unresolved external symbol _PROPID_ACC_ROLE
    Knob.obj : error LNK2001: unresolved external symbol _PROPID_ACC_VALUE
    Knob.obj : error LNK2001: unresolved external symbol _CLSID_AccPropServices
    Debug/Controls.dll : fatal error LNK1120: 3 unresolved externals

    Any ideas as to what is going wrong?

    Thanks in advance,

    Aristotel

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,839

    Re: oleacc link issues

    Is #include <oleacc.h> available to knob.h or knob.cpp?

    Arjay

  3. #3
    Join Date
    Dec 2004
    Location
    Leamington Spa, UK
    Posts
    202

    Re: oleacc link issues

    Hello,

    what do you mean by "available"? I have included the header in knob.h.

    Aristotel

  4. #4
    Join Date
    Dec 2004
    Location
    Leamington Spa, UK
    Posts
    202

    Re: oleacc link issues

    Anyone?


  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,839

    Re: oleacc link issues

    Quote Originally Posted by greekgoddj
    I have included the header in knob.h.
    That should be fine. You mentioned that the paths to oleacc.lib and oleacc.dll are present... have you explicitly added oleacc.lib as an additional linker dependency?

    Lastly...

    Make sure the following is defined in stdafx.h:
    #define _WIN32_WINNT 0x0500

    and make sure the following is NOT defined:
    #define WIN32_LEAN_AND_MEAN

    Finally, are you using the sdk? If so, is there a possibility that you have version conflicts between headers in the sdk and libs in VC or vice versa? In other words, make sure the Options/Projects/VC Directories all have the same search order for includes, libraries, and executables.

    Arjay

  6. #6
    Join Date
    Dec 2004
    Location
    Leamington Spa, UK
    Posts
    202

    Re: oleacc link issues

    Good morning Arjay...

    Thanks for the suggestions. I tried it all but unfortunately the problem is still there...Yes I am using the platform SDK.


    I ran a test with an MFC only ActiveX project but the problem was the same.

    I also tried the same test but in VS 6 instead of VS 2003, but the problem is still the same...

    Last edited by greekgoddj; February 15th, 2005 at 08:18 AM.

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,839

    Re: oleacc link issues

    The code below is the stdafx.h includes for one of my ATL projects in VC2003. These includes along with linking with oleacc.lib is all that is required. I would suggest making sure the sdk files and libraries match on your system. (I'm not sure you need the InitGuids.h include)

    Code:
    #define WINVER 0x0500
    #define _WIN32_WINNT 0x0500
    #define _ATL_APARTMENT_THREADED
    #define _ATL_NO_AUTOMATIC_NAMESPACE
    #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
    #define _ATL_ALL_WARNINGS
     
    #include <atlbase.h>
    #include <atlcom.h>
    #include <atlwin.h>
    #include <atltypes.h>
    #include <atlctl.h>	// Optional
    #include <atlhost.h> // Optional
    #include "Oleacc.h"
    #include <comdef.h>
    #include "winable.h"
    #include <atldbcli.h> // Optional
     
    _COM_SMARTPTR_TYPEDEF( IAccessible, __uuidof(IAccessible) );
     
    usingnamespace ATL;
    

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)