I have written a console application using Visual Studio 2003 under Windows XP SP2 that links to the latest ImageMagick C++ library.
It all runs fine in the debugger (converting and cropping some tiff images)
I copy the build target directory to another windows XP SP2 machine, open a cygwin window and run the console application and it again runs fine.
However, the images I actually need to convert reside on a remote XP machine so I copy the same release directory to the remote file system, then login using Remote Desktop Services as a local administrator. I open a cygwin console and run my tool. It exits almost immediately. The greeting message that I output in the first line of the main() function does not even get displayed.
How do I debug such a problem?
My first attempt was to use the strings tool to find all of the DLL names referenced in the executable and the Image Magick DLLs that are in my release directory. I then verified that all these DLLs were on the target system (and if they were not I copied them from mine to the release directory of the target machine). This had no effect.
I was assuming that the error relates to some DLL failing to load (although this is normally detected and reported by windows so it was unlikely to be the cause)
I have successfully written other console tools on my development machine that run ok on this same remote machine. The only difference I can see with this one if that I am linking to image magick.
Given that I cannot add debugging statements to the tool are there any suggestions about how I can diagnose this problem?
Any advice would be very much appreciated.