On 18/12/2016 17:28, Petr Hudeček wrote:
Hello,
I'm trying to use the boost-thread library in a Windows Runtime (UWP) project. The tutorial at https://blogs.msdn.microsoft.com/vcblog/2014/07/18/using-boo doesn't seem to work anymore.st-libraries-in-windows-store- and-phone-applications/
If I compile boost sources, either from the primary distribution, or from https://github.com/wpbest/Boost , I can compile it as a static library but when I link to it from the project, I receive linker errors that four identifiers could not be found. These identifiers are API functions such as CreateWaitableTimer.
Is there a way to use boost-thread from a UWP project despite this? Perhaps setting some preprocessor symbols?
Looks like Boost.Thread uses BOOST_PLAT_WINDOWS_RUNTIME for this, which is set by Predef according to the value of WINAPI_FAMILY - so if I'm reading this correctly, you shouldn't get those errors if the library really is compiled against the universal runtime.
BTW if I was doing this, I would just define BOOST_ALL_NO_LIB and then either:
* Add the thread lib source direct to my app, or
* Add the thread lib source to a static lib project in the IDE and reference it from the apps that need it.
IMO it's easier to keep build options all in synch this way.... but that's just me.
HTH, John.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users