1

I was trying to compile a vc++ project on pclsceleton tracking but got the following errors inspite of the fact that i have already included header files for them the code for which the error gives is-

// 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);
}

the error is as follows-

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
ampli
  • 11
  • 3
  • It looks like you forgot to add the corresponding lib file(s). – Roger Rowland May 31 '13 at 11:12
  • but the oscpacket doesn't contains any .lib files. it only has source and headers files for transmitting and receiving data between computers or devices. Also earlier it was giving an error -FATAL ERROR 1104-cannot open file 'oscpack.lib. I deleted this folder from the additional dependencies from properties and then the above error came – ampli May 31 '13 at 11:21
  • In which case, did you add the source files to the project as well as the headers? – Roger Rowland May 31 '13 at 11:23
  • i m working on sceleton tracking using oscpack. I generated vc++ project through Cmake gui. the cmakelists contained the instruction to include oscpack directories. – ampli May 31 '13 at 11:31
  • Related question - http://stackoverflow.com/q/6153765/2065121 - it looks like you should have built the SDK to get the lib and *then* add it to your own project. – Roger Rowland May 31 '13 at 11:44
  • i installed point cloud library from all in one installer.then everytime i just need to give .cpp and CMake file for generating the project file. in the oscpack folder i didn't get any .lib files. – ampli May 31 '13 at 11:57

0 Answers0