Casebash
Casebash

Reputation: 118962

Unresolved external symol __im__RpcServerListn

I already included Rpc.h, but I am still receiving error LNK2019: unresolved external symbol __im__RpcServerListen@12 referenced in function _main. Is there anything else I need to do to be able to call this function?

Upvotes: 0

Views: 132

Answers (1)

paxdiablo
paxdiablo

Reputation: 882226

It's not enough to include the header file, that just tells the compiler about the types, functions and so on, that you want to use.

You also have to link with the relevant object files or libraries since they contain the actual code that you will be calling. You can tell this because the error starts with LNK, meaning you have a linker issue rather than a compiler one.

The actual files that you need to link to should be specified for the linking phase. For Windows RPC, this appears to be rpcrt4.lib (see here).

Upvotes: 1

Related Questions