how to remove a linker error .exe file not found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simritsaini1982
    New Member
    • Aug 2008
    • 5

    how to remove a linker error .exe file not found

    hello..
    Can anybody tell me how to remove the linker error as mentioned above..
    i have created a simple program in C++ as given below
    Code:
    #include<iostream.h>
    #include<conio.h>
    class ABC
    {
        private:
        int a;
        public:
        void show()
        {
            cout<<"enter value of a:";
            cin>>a;
            cout<<"a="<<a;
        }
    };
    
    void main()
    {
        ABC a;
        a.show();
        getch();
    }
    i saved it with name ABC.cpp.after compiling above program, it shows no errors, that means it get compiled successfully. but when I try to run this program it shows a Linker error ABC.exe file not found.

    Please help me out whats the problem and how to remove it....
    Last edited by Frinavale; Feb 14 '17, 09:26 PM.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I am not convinced that it does what you have said "Can not find ABC.exe" is a system error not a linker error. In fact the linker error is probably that you didn't run the linker by the sounds of it.

    However all of this could have been easily sorted out if you had posted your actual command lines the output of those commands copied and pasted verbatim.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      What are the contents of your directory after you run the compiler (especially ABC.*)?

      Comment

      • simritsaini1982
        New Member
        • Aug 2008
        • 5

        #4
        error is exactly as I said before..
        that..
        Linker Error:ABC.exe File not found

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          You still have not posted the requested information, while you are about it you could tell us what tool-chain (compiler) and platform you are using.

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            You should be using <iostream> and not <iostream.h>.

            <iostream.h> is the pre-ANS C++ and has been obsolete since 1998.

            Then, are you sure you produced a .exe file. As I recall, various compilers produce a .out file.

            Comment

            • simritsaini1982
              New Member
              • Aug 2008
              • 5

              #7
              problem has been resolved thanx..

              Comment

              • hellvenom
                New Member
                • Feb 2017
                • 1

                #8
                please help me....i have the same problem

                Comment

                Working...