error: undefined reference to 'xnGetRefContextFromNodeHandle'

808 views
Skip to first unread message

shubham patni

unread,
Mar 5, 2012, 5:57:23 PM3/5/12
to OpenNI
Hi,
I am using openni lib in Android source code as an application, app
has native method implementation as well.
app working fine with ndk-build , but same if compiling

. . . /working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:1086: error:
undefined reference to 'xnGetRefContextFromNodeHandle'

. . . /devices/neo/working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:
1089: error: undefined reference to 'xnContextUnregisterFromShutdown'

. . . /working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:1090: error:
undefined reference to 'xnContextRelease'

. . . /working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:1091: error:
undefined reference to 'xnProductionNodeRelease'

. . .working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:135: error:
undefined reference to 'xnOSMemSet'
. . ./working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:272: error:
undefined reference to 'xnOSMemSet'
. . . working/ps_/devkit/OpenNI/Include/XnCppWrapper.h:469: error:
undefined reference to 'xnOSMemSet'
. . error: undefined reference to
'XnVSwipeDetector::~XnVSwipeDetector()'
collect2: ld returned 1 exit status


please let me know if any one idea over this...thanks

Gaurav Pruthi

unread,
Sep 4, 2012, 4:39:16 AM9/4/12
to openn...@googlegroups.com
 Hi Shubham,

 I am also getting similar errors while compiling on linux platform :

 NiSimpleSkeleton.c:(.text+0x1dc): undefined reference to `xnOSGetEpochTime'
/tmp/ccUfVhez.o: In function `User_LostUser(xn::UserGenerator&, unsigned int, void*)':
NiSimpleSkeleton.c:(.text+0x2c4): undefined reference to `xnOSGetEpochTime'
/tmp/ccUfVhez.o: In function `UserPose_PoseDetected(xn::PoseDetectionCapability&, char const*, unsigned int, void*)':
NiSimpleSkeleton.c:(.text+0x2f9): undefined reference to `xnOSGetEpochTime'
/tmp/ccUfVhez.o: In function `UserCalibration_CalibrationStart(xn::SkeletonCapability&, unsigned int, void*)':
NiSimpleSkeleton.c:(.text+0x3d3): undefined reference to `xnOSGetEpochTime'
/tmp/ccUfVhez.o: In function `UserCalibration_CalibrationComplete(xn::SkeletonCapability&, unsigned int, XnCalibrationStatus, void*)':
NiSimpleSkeleton.c:(.text+0x408): undefined reference to `xnOSGetEpochTime'
/tmp/ccUfVhez.o: In function `xnInitWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0x58b): undefined reference to `xnInit'
NiSimpleSkeleton.c:(.text+0x5a8): undefined reference to `serialize_int(char*, int)'
/tmp/ccUfVhez.o: In function `xnContextOpenFileRecordingWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0x617): undefined reference to `xnContextOpenFileRecording'
NiSimpleSkeleton.c:(.text+0x634): undefined reference to `serialize_int(char*, int)'
/tmp/ccUfVhez.o: In function `xnFindExistingRefNodeByTypeWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0x6e4): undefined reference to `xnFindExistingRefNodeByType'
NiSimpleSkeleton.c:(.text+0x701): undefined reference to `serialize_int(char*, int)'
NiSimpleSkeleton.c:(.text+0x75e): undefined reference to `xnFindExistingRefNodeByType'
NiSimpleSkeleton.c:(.text+0x77b): undefined reference to `serialize_int(char*, int)'
/tmp/ccUfVhez.o: In function `xnFindSkeletonCapabilityWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0x7e0): undefined reference to `xnIsCapabilitySupported'
/tmp/ccUfVhez.o: In function `xnStartGeneratingAllWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0xb0d): undefined reference to `xnStartGeneratingAll'
NiSimpleSkeleton.c:(.text+0xb2a): undefined reference to `serialize_int(char*, int)'
/tmp/ccUfVhez.o: In function `xnWaitOneUpdateAllWrapper(char const*)':
NiSimpleSkeleton.c:(.text+0xb9d): undefined reference to `xnWaitOneUpdateAll'
NiSimpleSkeleton.c:(.text+0xbbd): undefined reference to `xnGetUsers'
NiSimpleSkeleton.c:(.text+0xbda): undefined reference to `xnGetUsers'
NiSimpleSkeleton.c:(.text+0xc01): undefined reference to `xnIsSkeletonTracking'

Though I have included required header file <XnCppWrapper.h> and the OpenNI header file 

Please help if you are able to figure out the problem.

Thanks a lot.

Chi Xu

unread,
Sep 25, 2012, 1:36:28 AM9/25/12
to openn...@googlegroups.com
Hi, I have the similar error when using OpenNI.

Have you solved your problem?

Thanks,

Gaurav Pruthi

unread,
Sep 25, 2012, 2:54:45 AM9/25/12
to openn...@googlegroups.com
 hey Chi,

 Try putting explicit OpenNI library at the end of compilation command 'g++ ...... **  -lOpenNI' . I got this solved by this

Xu Chi

unread,
Sep 25, 2012, 3:02:29 AM9/25/12
to openn...@googlegroups.com
Dear Gaurav

Thank you very much, my friend!

It really works. It is amazing!

Best regards,

Xu Chi
--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openni-dev/-/DtrPlIxXTp8J.
To post to this group, send email to openn...@googlegroups.com.
To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.

Chi Xu

unread,
Sep 25, 2012, 4:54:37 AM9/25/12
to openn...@googlegroups.com
Dear Gaurav

Thank you very much, my friend!

It really works. It is amazing!

Best regards,

Xu Chi

Reply all
Reply to author
Forward
0 new messages