高手快来啊,error LNK2001 问题
//server.cpp
#include "mot.h"
...
...
if (RpcServerUseAllProtseqsIf(1, motfunc_v1_0_s_ifspec, NULL))
{
return FALSE;
}
...
...
server.obj : error LNK2001: 无法解析的外部符号 _motfunc_v1_0_s_ifspec
motfunc_v1_0_s_ifspec在mot.h中申明的外部变量——extern RPC_IF_HANDLE motfunc_v1_0_c_ifspec;
在mot_s.c中定义的——RPC_IF_HANDLE motfunc_v1_0_s_ifspec = (RPC_IF_HANDLE)& motfunc___RpcServerInterface;
mot.h 、mot_s.c和mot_c.c是有mot.idl编译产生的。
为什么产生连接错误呢?就高手解答啊!