Problems related to Facebook SDK C # WP8 from C ++ Windows Phone 8 Application

I am trying to link to facebook.dll - wp8 branch - in an application like "Windows Phone Direct3D App Project (Native Only)" in Visual C ++ VS2012 and I get the error:

reference to [dllname] could not be added because the two projects set different time intervals.

The limitation is that I cannot change the architecture of the application, so the main entry point must be in a C ++ project and from here to call code written in C # for facebook.

Based on http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714080(v=vs.105).aspx I also tried to reference the C # DLL indirectly via the Visual C ++ Windows Runtime Component but again i get the same error. I tried to change some of the project settings and nothing worked. Trying to consume C # dll in C ++, in all the samples and demos I found on the internet, for wp8, the main entry point is always in C #. Only a few clues regarding Windows Store apps seem to indicate that C # from C ++ could be used, but I find no references explicitly stating that my scenario on wp8 is possible or not possible.

How can I use the facebook SDK from my WP8 app? Or what are my options?

Thanks in advance to anyone who shares a solution or any suggestion

+3


source to share


1 answer


C ++ projects cannot just call any C # DLL in WP8. You will need to change the way the class is created. Start a new C # XAML + C ++ D3D project and have a look at IDrawingSurfaceManipulationHandler and Direct3DInterop. Basically you will have to recreate and recompile the Facebook C # SDK in order to use it in WP8 C ++.



However, installing and using the Facebook SDK on WP8 C # projects works on my machine. Did you think you were using a mixed C # and C ++ project? It has a slight performance kick, but as long as you use the DrawingSurfaceBackgroundGrid, you should still have a relatively good performance.

+1


source







All Articles