linking error: unable to open file sample.exe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gskiran
    New Member
    • Jul 2013
    • 2

    #1

    linking error: unable to open file sample.exe

    i just had written a small sample program, i compiled it there are no error wen i try to run the program am getting the error as (linking error: unable to open file sample.exe)
    can u pls let me knw wat do
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Is there by any chance a window open on your machine from a previous run of this program? If so, close it. The compiler wants to write over sample.exe but the file is open in another process.

    Comment

    • gskiran
      New Member
      • Jul 2013
      • 2

      #3
      no i didnt open any window i had tried a lot i closed al the turbo c++, wrote a smal sample program again but still same error

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        The only way sample.exe can't be opened by turbo C++, is that it is already open. Turbo C++ needs to write on the file. To do that, no other application can have the file open.

        There can be multiple readers and the file will open. But there can only be one writer.

        Comment

        • donbock
          Recognized Expert Top Contributor
          • Mar 2008
          • 2427

          #5
          When you say "try to run it", what exactly are you doing?
          What buttons are you pressing; what commands are you typing?

          I ask because I would not expect "linking error" to be run-time error.

          Comment

          • nitin070895
            New Member
            • Apr 2013
            • 17

            #6
            Open your code in turbo c++ and press ctrl+f9

            Comment

            Working...