Author Topic: Linker Error Using VStudio 2010  (Read 12136 times)

jglawrence

  • Member
  • ***
  • Posts: 13
Linker Error Using VStudio 2010
« on: June 01, 2011, 12:56:52 pm »
Hello,

I was able to convert your example code for HID drivers to work with Visual Studio 2010.  I am stuck on an error preventing my compilation of the code though.

1>usbhidiocDlg.obj : error LNK2019: unresolved external symbol "public: int __thiscall CWnd::KillTimer(unsigned int)" (?KillTimer@CWnd@@QAEHI@Z) referenced in function "protected: void __thiscall CUsbhidiocDlg::OnContinuous(void)" (?OnContinuous@CUsbhidiocDlg@@IAEXXZ)

Do you have any idea what I could do to fix this?  It has me puzzled.

Thanks!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Linker Error Using VStudio 2010
« Reply #1 on: June 01, 2011, 01:44:36 pm »

jglawrence

  • Member
  • ***
  • Posts: 13
Re: Linker Error Using VStudio 2010
« Reply #2 on: June 01, 2011, 03:06:13 pm »
I'm actually using Visual Studio C++ Express 2010.  I have also downloaded the WDK.  After commenting out the line of code calling the "KillTimer" function the program compiles.
Unfortunately when I run the program, I have the following error:
"The ordinal 5077 could not be located in the dynamic link library MFC42D.DLL."

Any ideas on this new error?

PS - I downloaded MFC42D.DLL and put it in the C:\WINDOWS\system32
« Last Edit: June 02, 2011, 03:12:33 pm by jglawrence »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Linker Error Using VStudio 2010
« Reply #3 on: June 01, 2011, 09:52:19 pm »
A search on the error message will bring up some suggestions. I have to admit that I haven't tried to compile that application in some time so have no specific suggestions.

Jan

jglawrence

  • Member
  • ***
  • Posts: 13
Re: Linker Error Using VStudio 2010
« Reply #4 on: June 02, 2011, 03:12:03 pm »
I ran the .exe file from the Release folder and it works fine now!  Now I just have to write my own application.

Thanks for your help and the book!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Linker Error Using VStudio 2010
« Reply #5 on: June 03, 2011, 09:30:08 am »
I'm glad you got it working. Good luck with your application.

Jan