Page 1 of 1

C++ for WP8

Posted: 02 May 2014, 09:24
by dhuang11
Has anyone had any success compiling SFS2X C++ client API for WP8? We've gotten the C++ client API to work with Cocos2D-X on iOS, Android, Win32 but cannot get it to work on WP8. We are having trouble getting the boost libraries to compile for Win ARM. Has anyone had any luck getting this combination to run?

Also - on another note - in this scenario, the usage of C++11 instead of boost libraries would've actually helped with portability.

Re: C++ for WP8

Posted: 12 May 2014, 11:55
by MBagnati
I have called the b2 command with the option that declares the target architecture

b2 -a toolset=msvc-11.0 threading=multi link=static address-model=32 architecture=arm runtime-link=shared --with-system stage

instead of

b2 -a toolset=msvc-10.0 threading=multi link=static runtime-link=shared --with-system stage

but I have this error from compiler:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\crtdefs.h(338) :
fatal error C1189: #error : Compiling Desktop applications for the ARM platform is not supported.

To solve the error I have tried the installation of "Windows Software Development Kit (SDK) for Windows 8.1" but I have the problem again.

I continue to investigate the issue

Re: C++ for WP8

Posted: 14 May 2014, 10:12
by dhuang11
Really glad to know that this is being investigated. For now, we've wrapped up all calls to SmartFoxServer2x and the Android, iOS, Win32 and Mac versions call into a C++ wrapper that we've created on top of the SFS2X C++ API. For WP8, we use some C++/Cxx classes to bridge from native C++ to/from the SFS2X C# API (why we need a wrapper). It would be great to share the same C++ code on all platforms. We would then be able to ditch our own abstraction for SFS2X API's as well as not have to deal with the messiness of bridging native to managed code (C++ to C#).

Re: C++ for WP8

Posted: 05 Jun 2014, 10:11
by dhuang11
Have looked into this further. Even if it were possible to compile Boost for WP8/WinRT ARM, SFS2X C++ makes use of boost::thread API's which make use of some system libraries that Microsoft forbids to be used in Windows store apps.

http://social.msdn.microsoft.com/Forums ... nativecode

Would love a SFS2X C++ API that uses C++11 and has no external dependencies like boost.

Re: C++ for WP8

Posted: 06 Jun 2014, 09:19
by Lapo
Thanks for reporting.

Unfortunately Boost is quite important in the C++ API and it wouldn't be possible to port them onto multiple platforms without it.
We use boost not only for pointers and threading but also for networking, another department which must be abstracted to be able to make this API portable.

Hopefully Boost will add support for WP8 eventually.

Thanks