MySvr fatal error LNK1120: 1 个无法解析的外部命令
MySvr error LNK2019: 无法解析的外部符号 _HelloWorld ,该符号在函数  _RemoteHelloWorld_HelloWorld@4 中被引用sourcecode:// main.cpp
#include <iostream>
#include "MyInterface.h" // 自己定义的接口头文件
// 使用midl生成(命令行为 " midl MyInterface.idl" ,MyInterface.idl文件见下!)void Output (const char* szOutput)
{
std::cout << szOutput << std::endl;
}int main()
{
RPC_STATUS status;//represents a platform-specific status code type.
    status = RpcServerUseProtseqEp ( //tells the RPC run-time library to use the specified protocol sequence 
reinterpret_cast<unsigned char*>("ncacn_ip_tcp"),
RPC_C_PROTSEQ_MAX_REQS_DEFAULT,
        reinterpret_cast<unsigned char*>("4747"),
NULL);

if (status) //if it sucess, it is 0L
exit(status);
     
status = RpcServerRegisterIf ( // register a interface
RemoteHelloWorld_v1_0_s_ifspec,
NULL,
NULL );    if(status)
exit(status); status = RpcServerListen( // listen for remote procedure calls for all registered interfaces.
         1,
 RPC_C_LISTEN_MAX_CALLS_DEFAULT,
 FALSE );

if (status)
exit(status);}// Memory allocating functions
void* __RPC_USER midl_user_allocate (size_t size)

 return(malloc(size)); 
}void __RPC_USER midl_user_free(void* p)
{
    free(p);
}
// MyInterface.idl
[
uuid(b26baa87-ecfa-474d-bea8-b90caab9f941),
version(1.0)
]
interface  RemoteHelloWorld
{
    void HelloWorld( [ in, string] const char*  szOutput);
}