Software Archive
Read-only legacy content
17060 Discussions

EnableHand() not working with Cocos2d-x

IPetr1
Beginner
797 Views

Hi,

EnableHand() returns PXC_STATUS_ITEM_UNAVAILABLE when using with Cocos2d-x. It works fine on the same computer as a non-Cocos2d-x project.

Steps to reproduce:

1) Download http://www.cocos2d-x.org/filedown/cocos2d-x-2.2.6.zip

2) Open cocos2d-win32.vc2012.sln project.

3) Right click HelloCpp in Solution Explorer to Set as StartUp project.

4) Integrate Property Sheet "c:\Program Files (x86)\Intel\RSSDK\props\VS2010-13.Integration.MD.props" to HelloCpp's Debug configuration.

5) Find HelloCpp's main.cpp and replace it with the following code:
 

#include "main.h"

#include "pxcdefs.h"
#include "pxcfaceconfiguration.h"
#include "pxcsensemanager.h"
#include "pxcspeechrecognition.h"
#include "pxcspeechsynthesis.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPTSTR    lpCmdLine,
    int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    PXCSession *g_session = PXCSession_Create();
    PXCSenseManager *pp = g_session->CreateSenseManager();
    pxcStatus status = pp->EnableHand();
    
    if (status != PXC_STATUS_NO_ERROR)
        MessageBox(NULL, L"EnableHand not working", L"Error", MB_OK);
    else
        MessageBox(NULL, L"EnableHand working", L"OK", MB_OK);

    return 0;
}

6) Click HelloCpp and hit F5

It will complain about:

LINK : fatal error LNK1104: cannot open file 'libpxcutilsmd_d.lib'

It is because Platform Toolset is set to v120_xp.

7) Copy files from "c:\Program Files (x86)\Intel\RSSDK\sample\common\lib\Win32\v120" to "c:\Program Files (x86)\Intel\RSSDK\sample\common\lib\Win32\v120_xp".

Note: It would be nice to include real v120_xp folder in SDK.

8) Hit F5 again.

9) It displays "EnableHand not working" message.

Output windows displays the following error, I think it is related to the issue:

First-chance exception at 0x77D1F4FA (ntdll.dll) in HelloCpp.exe: 0xC0000139: Entry Point Not Found.

Warm regards,
Ivan

0 Kudos
5 Replies
IPetr1
Beginner
797 Views

Those are working fine in the same project when using instead of EnableHand():

EnableEmotion()
Enable3DSeg()
EnableFace()
EnableTracker()

SDK info details:

Intel(R) RealSense(TM) SDK 3.1.0.25181
Intel(R) RealSense(TM) SDK Runtime 3.1.0.25181
Intel(R) RealSense(TM) Depth Camera Manager 1.2.14.24922
Intel(R) RealSense(TM) 3D Camera 0224

 

0 Kudos
Jonathan_M_Intel
Employee
797 Views

Developing under the v120_xp is not recommended.  Try recompiling using v120.  The SDK is only validated to operate on Windows 8.1, not Windows XP, so there is no need to use the v120_xp toolset to force backwards compatibility.  

0 Kudos
IPetr1
Beginner
797 Views

Not working with v120 either.

0 Kudos
Jonathan_M_Intel
Employee
797 Views

Can you open the SDK Information Viewer, click Save on the menu bar, and post or private message that txt file to me?

0 Kudos
IPetr1
Beginner
797 Views

I've sent you SDK info as a private message.

0 Kudos
Reply