The Airsource Blog

Why doesn't my BREW project work on this machine?

I had a client call me yesterday; he'd built a BREW application (most of the code provided by Airsource) on one machine, and it wouldn't run on another. It ran on all of our machines, so this was a bit difficult for us to debug, until eventually we tried it on a pretty much vanilla VMWare partition - and it wouldn't start. "Unable to start application" chirped the simulator, leaving us none the wiser.

Our instant thought was that we'd left a symbol in - say a stray memcpy instead of MEMCPY. But then again, it's not like the BREW Simulator doesn't use memcpy - and anyway, it worked on all of our machines....

Some time later, after searching the BREW forums extensively, we discovered that if we installed Visual Studio, it all started working. And some time after that, we tracked it down to MSVCRTD.DLL, which is the RunTime Debug library that comes as part of Visual Studio. When you compile a Debug project in Visual Studio, it links against MSVCRTD.DLL. Compile in release mode, and you need MSVCRT.DLL - but that, or course, is present on every Windows machine. If the debug library is absent - which it will be if you haven't installed Visual Studio - then your applet can't load - and you get the ubiquitous "Unable to start application" error.

So the moral is - if you want to run your project on another machine - but not debug it - then build the release mode version. It doesn't hurt to test your release build occasionally either...