0

all I am very new to C++. But I have used C# as my primary develop language. Now I have an application written in MFC. When I first built it, it gives me those error.

error LNK2001: unresolved external symbol "public: long __thiscall CWnd::SendMessageW(unsigned int,unsigned int,long)" (?SendMessageW@CWnd@@QAEJIIJ@Z) DbeCok.lib

Could someone give me a clue to fix this?

EDIT The original message is below Error 5 error LNK2001: unresolved external symbol "int __stdcall AfxDeactivateActCtx(unsigned long,unsigned long)" (?AfxDeactivateActCtx@@YGHKK@Z) C:\WebDev\SPC\DbeCok.lib(GridCellBase.obj)

4
  • Sounds like you forgot a lib. You'll need to a) add the folder where the lib is in Properties (of project) -> Linker -> General -> Additional Library Directories, and then add the library name in Properties -> Linker -> Input -> Additional Libraries
    – Borgleader
    Jul 2, 2013 at 5:28
  • Go into the project properties and in the General section check and make sure that the option "Use of MFC" is set to either "Use MFC in a Shared DLL" or "Use MFC in a Static Library" . If it's not set to one of those the MFC libraries will not be automatically linked. Jul 2, 2013 at 5:30
  • @Borgleader You mean "Additional Dependencies"? I added the libs.
    – Joshua Son
    Jul 2, 2013 at 5:54
  • @CaptainObvlious It is already "Use MFC in a Static Library".
    – Joshua Son
    Jul 2, 2013 at 5:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.