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. COM
  4. error LNK2001: unresolved external symbol _CLSID......

error LNK2001: unresolved external symbol _CLSID......

Scheduled Pinned Locked Moved COM
c++comsysadminhelpannouncement
2 Posts 2 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.
  • R Offline
    R Offline
    Rinu_Raj
    wrote on last edited by
    #1

    Hi All, Am new to COM and i tried creating a COM server and COM client COM Server is created by inservting ATL COM object in to MFC Dialog based application project I hav build the Server application successfully then i tried to CoCreateInstance() from the client app. i hav imported the .tlb file and TestCOMMFC_i.h files. But am getting the following link errors Compiling... TestClientDlg.cpp Linking... TestClientDlg.obj : error LNK2001: unresolved external symbol _CLSID_TestServer TestClientDlg.obj : error LNK2001: unresolved external symbol _IID_ITestServer Release/TestClient.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. TestClient.exe - 3 error(s), 0 warning(s) pls reply asap thnx in advance

    S 1 Reply Last reply
    0
    • R Rinu_Raj

      Hi All, Am new to COM and i tried creating a COM server and COM client COM Server is created by inservting ATL COM object in to MFC Dialog based application project I hav build the Server application successfully then i tried to CoCreateInstance() from the client app. i hav imported the .tlb file and TestCOMMFC_i.h files. But am getting the following link errors Compiling... TestClientDlg.cpp Linking... TestClientDlg.obj : error LNK2001: unresolved external symbol _CLSID_TestServer TestClientDlg.obj : error LNK2001: unresolved external symbol _IID_ITestServer Release/TestClient.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. TestClient.exe - 3 error(s), 0 warning(s) pls reply asap thnx in advance

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      You should also use the TESTCOMMFC_i.c file, which has the data for these symbols in it. Alternatively, you could use #import on the type library, with the named_guids tag. If you use the _i.c file, don't forget to change it's settings so that it doesn't use pre-compiled headers.

      Steve S Developer for hire

      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