Linking Errors
-
Hello I have been trying to implement the sample at the link http://www.codeproject.com/useritems/GetNtProcessInfo.asp[^] Its mentioned in the article to add the files "NTProcessInfo.h", "NTProcessInfo.cpp" to my project and exclude them while building the project. I have followed the instructions to add the files and exclude them while building the project. I did a #include "NTProcessInfo.h" at the top of my file MsiInfo.cpp. However, I get the following linking errors mentioned below: MsiInfo.obj : error LNK2001: unresolved external symbol "void __cdecl sm_FreeNTDLLFunctions(struct HINSTANCE__ *)" (?sm_FreeNTDLLFunctions@@YAXPAUHINSTANCE__@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "int __cdecl sm_GetNtProcessInfo(unsigned long,struct _smPROCESSINFO *)" (?sm_GetNtProcessInfo@@YAHKPAU_smPROCESSINFO@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __cdecl sm_LoadNTDLLFunctions(void)" (?sm_LoadNTDLLFunctions@@YAPAUHINSTANCE__@@XZ) Can somebody please tell me what is the reason for this? Thanx.
-
Hello I have been trying to implement the sample at the link http://www.codeproject.com/useritems/GetNtProcessInfo.asp[^] Its mentioned in the article to add the files "NTProcessInfo.h", "NTProcessInfo.cpp" to my project and exclude them while building the project. I have followed the instructions to add the files and exclude them while building the project. I did a #include "NTProcessInfo.h" at the top of my file MsiInfo.cpp. However, I get the following linking errors mentioned below: MsiInfo.obj : error LNK2001: unresolved external symbol "void __cdecl sm_FreeNTDLLFunctions(struct HINSTANCE__ *)" (?sm_FreeNTDLLFunctions@@YAXPAUHINSTANCE__@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "int __cdecl sm_GetNtProcessInfo(unsigned long,struct _smPROCESSINFO *)" (?sm_GetNtProcessInfo@@YAHKPAU_smPROCESSINFO@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __cdecl sm_LoadNTDLLFunctions(void)" (?sm_LoadNTDLLFunctions@@YAPAUHINSTANCE__@@XZ) Can somebody please tell me what is the reason for this? Thanx.
It seems you need to import lib file or files to your project.
-
Hello I have been trying to implement the sample at the link http://www.codeproject.com/useritems/GetNtProcessInfo.asp[^] Its mentioned in the article to add the files "NTProcessInfo.h", "NTProcessInfo.cpp" to my project and exclude them while building the project. I have followed the instructions to add the files and exclude them while building the project. I did a #include "NTProcessInfo.h" at the top of my file MsiInfo.cpp. However, I get the following linking errors mentioned below: MsiInfo.obj : error LNK2001: unresolved external symbol "void __cdecl sm_FreeNTDLLFunctions(struct HINSTANCE__ *)" (?sm_FreeNTDLLFunctions@@YAXPAUHINSTANCE__@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "int __cdecl sm_GetNtProcessInfo(unsigned long,struct _smPROCESSINFO *)" (?sm_GetNtProcessInfo@@YAHKPAU_smPROCESSINFO@@@Z) MsiInfo.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __cdecl sm_LoadNTDLLFunctions(void)" (?sm_LoadNTDLLFunctions@@YAPAUHINSTANCE__@@XZ) Can somebody please tell me what is the reason for this? Thanx.