Thread: error : "the system cannot find the file specified"

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    183

    error : "the system cannot find the file specified"

    Hello,

    One of my friends started learning c++ and sent me his code:

    It is completely correct and I can run it on my PC but he gets this error while trying to run the code:

    "unable to start program 'c:\users\.....\visual studio2010\projects\h\debug\h.exe'
    the system cannot find the file specified"

    I had heard this is about a problem in the Platform SDK.
    Am I right?
    How can we fix it?


    thanks
    arian

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    Basic IT would tell you that the file is not in the path specified. If it is a known error with SDK then am sure google would provide answers. It looks on the surface like the build has not completed correctly and the exe has not been created in the target path. Have you tried a search for the file?
    Last edited by rogster001; 03-04-2011 at 06:52 AM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    I searched the net before opening this new threate
    and found some discussions about the problem but none of the solutions worked for us!

    I am waiting for his answer about finding the exe file after building the project. I know he can build the project as he said "nothing happened by pressing F6". and the error message box pops up just while running the program.

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    sorry I meant thread

  5. #5
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Arian, the message is clear
    unable to start program 'c:\users\.....\visual studio2010\projects\h\debug\h.exe'
    the system cannot find the file specified
    the file cannot be found so it probably doesn't exist. Could give you a lot of guesses* why but it is a bit pointless, so simple search for the file first

    *cannot resist to guess: you are giving him the path to execute the program but since it is a different PC it is "users/You" where it should be "users/Him"

  6. #6
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    building and using ctrl +F5 solve the problem
    so I guess the exe file exists but I dont understand what the problem is

  7. #7
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

    .

    you guess? so you did not do a search? i assume you used the key combo for 'run' in your ide, and that worked, so where on earth where you trying to execute the file previously that did not work? you were not aware of the path to your build target and tried to invoke with an incorrect cmd line path?
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  8. #8
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    Quote Originally Posted by rogster001 View Post
    so you did not do a search?
    I asked my friend but after pressing ctrl +F5 , he could run the program and he just answered me, problem solved!


    Quote Originally Posted by rogster001 View Post
    i assume you used the key combo for 'run' in your ide, and that worked
    what is a key combp and ide?


    Quote Originally Posted by rogster001 View Post
    so where on earth where you trying to execute the file previously that did not work? you were not aware of the path to your build target and tried to invoke with an incorrect cmd line path?
    to be honest I have never set a path to run a program. pressing F5 always led in the command prompt page to come up and ....

    thank you
    Arian

  9. #9
    Registered User
    Join Date
    Mar 2011
    Posts
    5
    Happens to me sometimes. He can't find it because it isn't there.
    If your friend is using Visual Studio he could try right click on solution -> rebuild. Worked for me.
    Or to copy-paste source to new project and recompile.

  10. #10
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    I asked my friend about the file.
    He said, the file exists.

    and to my surprise, the problem is gone!
    he said after one time of using "[right click->debuge] and pressing [CTRL + F5]" everything got back to normal!

    Thank you
    Arian

  11. #11
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

    the mind boggles

    what is a key combo and ide? ... i give up, right there, that broke me!
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  12. #12
    Registered User
    Join Date
    Nov 2003
    Posts
    183
    Great answer to a question!!

    I believe it is ok if you don't know something in the first place
    But
    It is not ok if you dont ask!


    There are words/abbreviations that might be unknown for a person with english as his/her second language.
    Last edited by arian; 03-06-2011 at 01:32 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File System Implementation
    By dodgeviper in forum C Programming
    Replies: 9
    Last Post: 11-16-2007, 01:04 PM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM