none
error LNK2019 when compiling InteractionStream code RRS feed

  • Question

  • Hi King Nguyen,

          I tried to build your code to create interactions. But when the function NuiCreateInteractionStream() is called it gives me the error as following:

    1>SkeletonBasics.obj : error LNK2019: unresolved external symbol _imp__NuiCreateInteractionStream@12 referenced in function "private: long _thiscall CSkeletonBasics::CreateFirstConnected(void)" (?CreateFirstConnected@CSkeletonBasics@@QAEJXZ)

    The implementation of the NuiCreateInteractionStream() is as follows :

                    

    class interactionClient : public INuiInteractionClient
    {
        public:
            interactionClient()                                                 {}
            ~interactionClient()                                                {}
            STDMETHODIMP_(ULONG)    AddRef()                                    { return S_OK;     }
            STDMETHODIMP_(ULONG)    Release()                                   { return S_OK;     }
            STDMETHODIMP            QueryInterface(REFIID riid, void **ppv)     { return S_OK;  }
            STDMETHODIMP GetInteractionInfoAtLocation(DWORD skeletonTrackingId, NUI_HAND_TYPE handType, FLOAT x, FLOAT y, NUI_INTERACTION_INFO *pInteractionInfo)
            {

                if(pInteractionInfo)
                {
                    pInteractionInfo->IsGripTarget          = true;
                    pInteractionInfo->PressTargetControlId  = 0;
                    pInteractionInfo->PressAttractionPointX = 0.f;
                    pInteractionInfo->PressAttractionPointY = 0.f;

                    return S_OK;
                }
                return E_POINTER;
            }
    };

    interactionClient m_nuiIClient;

    .............................................................

    hr = m_pNuiSensor->NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON | NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX|  NUI_INITIALIZE_FLAG_USES_COLOR); 

    m_hNextInteractionEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

    hr = NuiCreateInteractionStream(m_pNuiSensor,(INuiInteractionClient *)&m_nuiIClient, &m_nuiIStream);

    .............................................................

    I included the KinectInteraction170_64.lib in the linker->input of the project. But I don't know why did it give the same error? Can u please help me??? Is there any dll need to be included?? How can I build it???

    Regards,

    Vvk


    Friday, May 31, 2013 12:17 PM

All replies