Kinect / Docs

Markdown documentation for Kinect for Windows
MIT License
74 stars 35 forks source link

Function 'GetDefaultKinectSensor' always gives a LNK2019 error when linking. #20

Open LuvaiCutlerywala opened 3 years ago

LuvaiCutlerywala commented 3 years ago

For context, I am currently using Visual Studio 2019 for the project and am using the Kinect For Windows SDK 2.0. I have set the path for the Kinect20.lib file in the Linker section of the Properties sheet, as well as also included the Kinect.h header file. When linking, it has always given me the error LNK2019 unresolved external symbol _GetDefaultKinectSensor@4 referenced in function "public: static long __cdecl BodyTracker::initialiseSensor(void)" (?initialiseSensor@BodyTracker@@SAJXZ) BodyTracker C:\Users\luvai_kcrxbon\C++\BodyTracker\BodyTracker.obj 1 . I am quite to new to VS, as well as programming for the Kinect. So any help, or even a pointer in the right direction would be much appreciated.

KIRFEDO commented 10 months ago

Hi guys, for anyone still out there, to fix this issue you need to add kinect20.lib in Project Properties -> Linker -> Input -> Additional Dependencies :)