Skip to content
Archive of entries posted on January 2012

Compiling with Microsoft’s ARM compiler for Windows Mobile with Visual Studio

I have played with Visual Studio 2008 and Microsoft Mobile SDK to build some native code for windows phone. This is pretty much a LOG for myself, since I tend to forget things. Currently I have the Snes9x sources compiled inside a native COM DLL, which I can use from the managed wp7 code. Don’t get too excited since that code probably don’t work at all (yet), but it’s a nice start, and I like to learn how to use new tools by using them.

I started by building the snes9x sources as a one static library, and including that library from a COM DLL, which will define the interface the to managed code. It’s a nice way to build an app, since I can easily separate the COM communication interface and the snes9x code.

The Environment

You can not actually build a native library with Windows Phone SDK, but it seems that you can build a COM DLL with Windows Mobile SDK, and use that from the managed code. This is totally unsupported “feature”,  so everything might not work as you expect ;-)

First you must install Visual Studio 2008 and Windows Mobile SDK. You can get more details of the native environment from Heathcliff74 XDA-developers post

I installed the good old Windows XP inside a virtual box, and then I installed

  1. Visual Studio 2008 with latest service pack and hotfixes.
  2. Windows Mobile 6 Professional SDK Refresh.
After everything has been installed we can start the development by creating a new static library.

Creating a static library

To create a static library you should create a new project (file/new project). Choose Visual c++ / Smart Device / Win32 Smart Device Project. Then choose Application settings, and choose application type, and use “static library”

Continue reading ‘Compiling with Microsoft’s ARM compiler for Windows Mobile with Visual Studio’ »