Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Program does not run on command line


  • Please log in to reply

#1
blacknapkins

blacknapkins

    New Member

  • Member
  • Pip
  • 1 posts
I am looking for some guidance on how to determine the cause of an unusual problem.

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.
  • 0

Advertisements


#2
artur02

artur02

    New Member

  • Member
  • Pip
  • 3 posts

I am looking for some guidance on how to determine the cause of an unusual problem.

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.


Visual Studio can attach to a remote application. You can find this functionality in Tools/Attach...
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP