Open oneandonlyoddo opened 4 years ago
I now opened the solution in VS 15 and removed Threads::Threads.lib from the additional dependencies for freenect2, freenect2-openni2 and Protonect. Managed to build and Protonect runs. I'll see if I run into any issues.
I encountered the same problem on VS2019.
Try adding find_package(Threads) to the CMake file, that seems to have worked for me - must be something about when the library is added vs when it is called?
Try adding find_package(Threads) to the CMake file, that seems to have worked for me - must be something about when the library is added vs when it is called?
It works! Thanks for saving my time ^^
BTW, just as @NicholasNelsonwood mentioned, I added FIND_PACKAGE(Threads) before INCLUDE(SetupLibfreenect2Threading) in CMakeList.txt.
I am trying to build libfreenect2 on Windows 10 with Visual Studio 2019 Community Edition. Configuring runs without problems. Then there are lots of CMake warnings like this one:
As far as I can tell these warnings come up for every target that lists Threads::Threads.lib in AdditionalDependencies.
Then it starts building but fails at some point due to a link error with Threads:
Threads::Threads.lib doesn't produce any good Google results for me so I don't understand if I am missing something third party or if it is part of libfreenect2. Any ideas on how I can fix this link?
Edit: After reading this: https://github.com/OpenKinect/libfreenect2/issues/11 I checked the output again and the feature list names tinythread for Threading:
Edit 2: In the meantime I tried building with VS 2015 instead of 2019 but I am running into the exact same Issue. With VS15 I can enable CXX11 which then lists
Threading std::thread
but the issue remains. CXX11 support fails with VS19.