ssk
ssk

Reputation: 9265

Linking Existing C++ dll with Windows Phone Component Runtime

I am trying to link a C++ dll compiled for x86 with the Windows Phone Project. I followed the tips in:

1) http://www.be-init.nl/getmedia/1318adfa-cd4d-4390-a30d-817fd97e37da/Using-native-code-in-your-Windows-Phone-8-Applications-Maarten-Struys.pdf.aspx?ext=.pdf

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

Answers (1)

Karsten
Karsten

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

Related Questions