Cannot run nuitrack_console_sample

Hello,

I’m new to C++, so I don’t really know what do I do to get rid of the errors. I have downloaded the Nuitrack SDK for RealSense D415 and Windows 10. I think I have added the headers and .lib files to my Visual Studio 2017 project. But after I ran ‘main.cpp’ of nuitrack_console_sample, some error showed up.
So how can I get rid of these errors? Thanks for any help. The errors are listed below.

Severity Code Description Project File Line Suppression State
Warning C4190 ‘nuitrack_ConvertProjToRealCoordsXYZ’ has C-linkage specified, but returns UDT ‘tdv::nuitrack::Vector3’ which is incompatible with C Project7 e:\nuitracksdk\nuitrack\include\nuitrack\capi\depthsensor_capi.h 68
Warning C4190 ‘nuitrack_ConvertProjToRealCoordsVector3’ has C-linkage specified, but returns UDT ‘tdv::nuitrack::Vector3’ which is incompatible with C Project7 e:\nuitracksdk\nuitrack\include\nuitrack\capi\depthsensor_capi.h 69
Warning C4190 ‘nuitrack_ConvertRealToProjCoordsXYZ’ has C-linkage specified, but returns UDT ‘tdv::nuitrack::Vector3’ which is incompatible with C Project7 e:\nuitracksdk\nuitrack\include\nuitrack\capi\depthsensor_capi.h 71
Warning C4190 ‘nuitrack_ConvertRealToProjCoordsVector3’ has C-linkage specified, but returns UDT ‘tdv::nuitrack::Vector3’ which is incompatible with C Project7 e:\nuitracksdk\nuitrack\include\nuitrack\capi\depthsensor_capi.h 72
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\depthframe.h 34
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\depthframe.h 42
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\modules\depthsensor.h 179
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\rgbframe.h 35
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\rgbframe.h 43
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\userframe.h 57
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\userframe.h 69
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\userframe.h 77
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\skeletondata.h 61
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\skeletondata.h 67
Warning C4244 ‘return’: conversion from ‘float’ to ‘uint64_t’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\skeletondata.h 86
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\gesturedata.h 47
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\gesturedata.h 67
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\gesturedata.h 102
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\gesturedata.h 133
Warning C4267 ‘return’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\handtrackerdata.h 48
Warning C4267 ‘argument’: conversion from ‘size_t’ to ‘int’, possible loss of data Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\handtrackerdata.h 69
Error C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\issue.h 71
Error C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\issue.h 81
Warning C4129 ‘P’: unrecognized character escape sequence Project7 c:\users\lenovo\source\repos\project7\project7\source.cpp 49
Warning C4129 ‘N’: unrecognized character escape sequence Project7 c:\users\lenovo\source\repos\project7\project7\source.cpp 49
Warning C4129 ‘d’: unrecognized character escape sequence Project7 c:\users\lenovo\source\repos\project7\project7\source.cpp 49

Hi Zhijia Chen,

There are only two errors, all you have to do is follow the instructions mentioned in the error description:

  • Error C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\issue.h 71
  • Error C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. Project7 e:\nuitracksdk\nuitrack\include\nuitrack\types\issue.h 81

Thanks for your reply. I disabled the deprecation by using _CRT_SECURE_NO_WARNINGS. But after I ran it again, there’s another error saying:

Usage: nuitrack_console_sample [path/to/nuitrack.config]
Configuration file ( C:Program FilesNuitrack
uitrack
uitrackdata ) error: C:Program FilesNuitrack
uitrack
uitrackdata: cannot open file
Can not initialize Nuitrack (ExceptionType: 3)

What does it mean? Thanks for your help :slight_smile:

Hi Zhijia Chen,

What is the value of the NUITRACK_HOME environment variable set on your PC?