我试图在 pclsceleton 跟踪上编译一个 vc++ 项目,但得到了以下错误,尽管我已经为它们包含了头文件,错误给出的代码是 -
// Callback: New user was detected
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
{
printf("New User %d\n", nId);
userGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
osc::OutboundPacketStream p( osc_buffer, OUTPUT_BUFFER_SIZE );
p << osc::BeginBundleImmediate;
p << osc::BeginMessage( "/new_user" );
p << (int)nId;
p << osc::EndMessage;
p << osc::EndBundle;
transmitSocket->Send(p.Data(), p.Size());
}
// Callback: An existing user was lost
void XN_CALLBACK_TYPE User_LostUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie) {
printf("Lost user %d\n", nId);
if (kitchenMode) return;
osc::OutboundPacketStream p( osc_buffer, OUTPUT_BUFFER_SIZE );
p << osc::BeginBundleImmediate;
p << osc::BeginMessage( "/lost_user" );
p << (int)nId;
p << osc::EndMessage;
p << osc::EndBundle;
transmitSocket->Send(p.Data(), p.Size());
}
// Callback: Detected a pose
void XN_CALLBACK_TYPE UserPose_PoseDetected(xn::PoseDetectionCapability& capability, const XnChar* strPose, XnUserID nId, void* pCookie)
{
printf("Pose %s detected for user %d\n", strPose, nId);
userGenerator.GetPoseDetectionCap().StopPoseDetection(nId);
userGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
}
错误如下 -
Error 54 error LNK2019: unresolved external symbol "public: __cdecl osc::OutboundPacketStream::~OutboundPacketStream(void)" (??1OutboundPacketStream@osc@@QEAA@XZ) referenced in function "void __cdecl User_NewUser(class xn::UserGenerator &,unsigned int,void *)" (?User_NewUser@@YAXAEAVUserGenerator@xn@@IPEAX@Z) G:\project\pclsceleton\build\pclsceleton.obj pclsceleton
Error 55 error LNK2019: unresolved external symbol "public: void __cdecl UdpSocket::Send(char const *,int)" (?Send@UdpSocket@@QEAAXPEBDH@Z) referenced in function "void __cdecl User_NewUser(class xn::UserGenerator &,unsigned int,void *)" (?User_NewUser@@YAXAEAVUserGenerator@xn@@IPEAX@Z) G:\project\pclsceleton\build\pclsceleton.obj pclsceleton
Error 56 error LNK2019: unresolved external symbol "public: char const * __cdecl osc::OutboundPacketStream::Data(void)const " (?Data@OutboundPacketStream@osc@@QEBAPEBDXZ) referenced in function "void __cdecl User_NewUser(class xn::UserGenerator &,unsigned int,void *)" (?User_NewUser@@YAXAEAVUserGenerator@xn@@IPEAX@Z) G:\project\pclsceleton\build\pclsceleton.obj pclsceleton