Nuitrack_CAPI.h error in the console C++ example

I am getting this and other “unresolved external link” errors when trying to compile the nuitrack console example:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__nuitrack_InitializeFromConfig referenced in function “public: static void __cdecl tdv::nuitrack::Nuitrack::init(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)” (?init@Nuitrack@nuitrack@tdv@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) NuiConsole C:\nuitrack\NuitrackSDK\Examples\nuitrack_console_sample\main.obj 1

Can anyone help?
Thanks

Hi steram,

Please advise what compiler and toolchain do you use?

Visual Studio 2017 and a realsense D435

Please make sure that you’ve added nuitrack.lib and middleware.lib to the list of linking libraries. You can find these files here: Nuitrack SDK/Nuitrack/lib/win64.

I have the same problem as well. I don’t know why. When I remove Nuitrack::init(Config); it works fine but once I calll it it give this error Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__nuitrack_InitializeFromConfig referenced in function “public: static void __cdecl tdv::nuitrack::Nuitrack::init(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)” (?init@Nuitrack@nuitrack@tdv@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) CammeraProject C:\Users\seanD\source\repos\CammeraProject\CammeraProject\CammeraProject.obj 1

Hey I fix it. to solve this problem make sure your target machines match the lib that you use in the project. If you use x64 lib with a x32 target you will for sure get this error. I think it helps to have the camera plugged in as well.