Jump to content

Error: Cannot execute program.


Guest BuD

Recommended Posts

This is my first post so Hi all!

I have been reading this forum ever since I got my SPV and it has been priceless - thanks so much.

Any way down to business :)

I am new to windows programming and am trying to do some work on a project that was originally pocket pc and has now been ported to smartphone.

Development enviroment is evc 3. I can compile samples and run them on the actual device and the emulator without problem. I havent tried debugging yet but am aware of the sp2002dps.exe and DebugPrep.exe and will have to work these out when the time comes.

I am interested in working with the project using the emulator to debug and develop the project and just using the release build for arm to ensure that the behaviour on the emulator mirrors the phones.

I can compile the project fine in arm release mode and x86 debug mode. The program runs fine on the phone but when i launch it on the emulator (without any debugging symbols) the files get copied to the emulator but an error message pops up in evc just before the program should run. The message simply says: Cannot execute program.

I have used the remote file viewer from inside the ide to ensure all the files have copied correctly. To try to identify if the problem was caused by evc I used the remote file viewer and the emulator outside evc and copied over the files. However the only way i found to start the program was to target it in ie with file://WindowsmyProg.exe

This did not work and produced a standard - unable to run myProg.exe verify the program location and libraries etc.

If anyone can shed any light on this I would be really gratful cos its driving me nuts :/

BuD

Link to comment
Share on other sites

Guest benjymous

You get the "cannot execute program" message if you try and run an Arm build in the emulator (as it only handles x86 builds)

Though eVC should give you a warning to that effect when you try and run an arm binary :?

Link to comment
Share on other sites

Thanks for the input benjymous.

I tried running an arm build on the emulator and as you say this does produce the exact same error message. However as you also point out in this situation evc gives an explicit warning before each dll and the exe is copied to the emulator. I dont get these messages with my project.

I have checked all my build settings and I have /MACHINE:IX86 in the link settings for all of the dependant sub projects.

I guess that this is a fairly uncommon problem as I have not been able to find a solution from searching the usual places although I have seen a couple of posts with people having the same problem - no working solution found though :/

Have any of you guys any suggestions how I can do more trouble shooting to locate the cause of the problem?

At this point I am unable to determine if the fault lies with the project, my windows enviroment setup, evc or the emulator.

Thanks

BuD

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.