Reputation: 9265
I am trying to link a C++ dll compiled for x86 with the Windows Phone Project. I followed the tips in:
2) http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx
3) http://code.msdn.microsoft.com/wpapps/Windows-Runtime-Component-fb644b34
My question is whether I can re-use the native dll for x86 under Windows Phone Component Runtime? If not, how do I port the existing native C++ dll to Windows Phone?
For example, in the sample project (http://www.jarredcapellman.com/2012/11/3/how-to-get-c-winrt-in-a-windows-phone-8-application) I tried to add opencv dll for windows x86 and tried to call opencv functions (http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html).
It compiles fine but when I run the app, it crashes with an error message Module not found exception.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Upvotes: 0
Views: 1134
Reputation: 1939
Windows Phone has an ARM architecture and is NOT compatible with x86/64 PC. You only can share the source code by including.
The steps for building a Windows Phone Component Runtime are declared here: http://code.msdn.microsoft.com/wpapps/Windows-Runtime-Component-fb644b34
Upvotes: 1