Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / August 2003

Tip: Looking for answers? Try searching our database.

LNK2001 error, use to be 2019

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brandon Alexander - 12 Aug 2003 06:03 GMT
I keep getting a LNK2001 error (unresolved external
symbol "symbol") when calling AccessibleObjectFromWindow
() . I'm including the right libraries and it's
implemented correctly, what could be the problem?
Here's my code:

#include <windows.h>
//Active Accessibility Header Files
#include <winable.h>
#include <oleacc.h>

int FAR PASCAL WinMain(HINSTANCE hInstance, HINSTANCE
hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
   HRESULT hr;
   IAccessible * paccMainWindow = NULL;
   HWND hWndMainWindow = FindWindow(NULL,"Untitled -
Notepad");
   if(hWndMainWindow!=NULL)
   {
       SetForegroundWindow(hWndMainWindow);
       hr=AccessibleObjectFromWindow
(hWndMainWindow,OBJID_WINDOW, IID_IAccessible,(void**)
&paccMainWindow);  //error at this function call
   }
    return 0;
}

Please help,
-Brandon
David Lowndes - 12 Aug 2003 08:00 GMT
>I keep getting a LNK2001 error (unresolved external
>symbol "symbol") when calling AccessibleObjectFromWindow
>() . I'm including the right libraries

Brandon,

Have you added "Oleacc.lib" to your project's list of libraries it
links to?

Dave
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq

Brandon Alexander - 12 Aug 2003 17:54 GMT
>Brandon,
>
>Have you added "Oleacc.lib" to your project's list of libraries it
>links to?
>
>Dave

Dave, I'm still pretty new to VS.net, can you tell me how
to add the lib file? Does it not do it by adding
<oleacc.h>? Thank you!
Brandon Alexander - 12 Aug 2003 18:07 GMT
>Have you added "Oleacc.lib" to your project's list of libraries it
>links to?
>
>Dave

I figured out how to add the .lib file, it fixed the
problem. Why did I need to add it if I included
<oleacc.h>? When else do I need to add .lib files? Thank
you!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.