Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Linking Errors

Linking Errors

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kiranin
    wrote on last edited by
    #1

    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.

    H S 2 Replies Last reply
    0
    • K kiranin

      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.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      It seems you need to import lib file or files to your project.

      1 Reply Last reply
      0
      • K kiranin

        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.

        S Offline
        S Offline
        ShilpiP
        wrote on last edited by
        #3

        Please remove /Zl from the command line property page.

        Yes U Can ...If U Can ,Dream it , U can do it ...ICAN

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups