Search code examples
c++visual-c++dllmfcdllexport

Error LNK2001: unresolved external symbol _getStatus BuleCappServiceUseDynamicDllDlg.obj


I am created Regular DLLs Dynamically Linked to MFC...

in dll using export function

Example: extern "C" declspec(dllexport) bool getStatus()

after build dll successfully.

then this dll and lib file import my new Project. after include all header file to my new Project and this file to use build dll.

then i use export function in my project

in Build mode Successful after Use Release Mode It get Linked Error LNK2001: unresolved external symbol _getStatus BuleCappServiceUseDynamicDllDlg.obj


Solution

  • You need to set dependency in release mode also. Rightclick on project->click on Property->c++->Additional Include Directories and write the name of dlls in both release and debug mode.