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