Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linking errors

Posted on 2006-06-19
5
Medium Priority
?
1,674 Views
Last Modified: 2008-01-09
Hi,

I have an application that connects to COM servers to process certain information.  I did not set this part up myself.  It was already set up this way when I joined.  I'm now trying to use these servers in a separate project.  I went through the project that already had the servers set up and tried to do the same to my new project.  As far as I can tell, everything is the same (i.e. all files and libraries have been added to my project) but I must be forgetting something.  

I'm getting the following link errors when I compile:

Linking...
dlldata.obj : error LNK2001: unresolved external symbol __imp__NdrDllGetClassObject@24
dlldata.obj : error LNK2001: unresolved external symbol __imp__NdrDllCanUnloadNow@4
dlldata.obj : error LNK2001: unresolved external symbol _NdrCStdStubBuffer_Release@8
dlldata.obj : error LNK2001: unresolved external symbol _NdrCStdStubBuffer2_Release@8
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_DebugServerRelease@8
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_DebugServerQueryInterface@8
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_CountRefs@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_IsIIDSupported@8
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_Invoke@12
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_Disconnect@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_Connect@8
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_AddRef@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _CStdStubBuffer_QueryInterface@12
SvrTools_p.obj : error LNK2001: unresolved external symbol _NdrStubCall2@16
SvrTools_p.obj : error LNK2001: unresolved external symbol _NdrStubForwardingFunction@16
SvrTools_p.obj : error LNK2001: unresolved external symbol _IUnknown_Release_Proxy@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _IUnknown_AddRef_Proxy@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _IUnknown_QueryInterface_Proxy@12
SvrTools_p.obj : error LNK2001: unresolved external symbol _NdrOleFree@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _NdrOleAllocate@4
SvrTools_p.obj : error LNK2001: unresolved external symbol _NdrClientCall2

Can anyone help me out?

Thanks
0
Comment
Question by:StanChart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 16936731
VisualStudio (or, to be more precise 'MIDL') will generate some files when building your app which contain references to these symbol. Add

#pragma comment(lib,"rpcndr.lib")

to your source code or add "rpcndr.lib" manually to your project.
0
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 16936878
Sorry, I forgot, you should also link with "rpcrt4.lib", i.e.

#pragma comment(lib,"rpcrt4.lib")

(or, as above, add that to your project manually)
0
 

Author Comment

by:StanChart
ID: 16936920
dude, you are the fken man!!  I spent a lot of time on this going through my project making sure I didn't forget anything.  I don't see this in my other project though. Any ideas why that works without these libs?
0
 
LVL 86

Expert Comment

by:jkr
ID: 16936946
Huh, that depends. MIDL might have already added that to the files upon generation, or they are already listed as part of the "default libraries" in the linker option. Mybe you started out with a different project type.
0
 
LVL 86

Expert Comment

by:jkr
ID: 16986477
Any other problems here?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question