Menu

Error 1

2007-09-18
2012-09-26
  • VampireSilence

    VampireSilence - 2007-09-18

    Hi !

    I got a problem with Dev-C++.

    I wanted to compile some lines but what ever I do I always get the error 1.

    [Build Error] [main.o] Error 1

    Compiler Log :

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\Makefile.win"
    Führt make... aus
    make.exe -f "C:\Dev-Cpp\Makefile.win" all
    g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

    g++.exe: main.cpp: No such file or directory
    g++.exe: no input files

    make.exe: *** [main.o] Error 1

    Ausführung beendet

    (German log)

    What should I do ???

    ThX b4

    VampireSilence

     
    • Soma

      Soma - 2007-09-21

      O_o

      And you still haven't posted your log...

      1) Create a folder at 'C:\Test'
      2) Open Dev-C++ and start a new C++ console project
      3) Save the Dev-C++ project file at 'C:\Test\Test.dev'
      4) Save the source file at 'C:\Test\Test.cxx'
      5) Hit 'Rebuild All' from the toolbar
      6) Open the 'Compiler Log' sub-window and copy the log
      7) Paste the log to a new message in this thread
      8) Open 'Explorer'
      9) Check 'Search for all files and folders' (or whatever may be present on your flavor of Windows)
      10) Search for 'devcpp.ini'.
      11) Open the 'devcpp.ini' file(s) with 'Notepad'
      12) Copy the contents of the file(s)
      13) Paste the contents of the file(s) to the new message in this thread

      If I even have the slightest impression that you've not done exactly what you've been told I, at the least, will not be helping you again. I will not be helping again if you pull any "I've already done" nonsense.

      Do what your told and we can help.

      Soma

       
      • Wayne Keen

        Wayne Keen - 2007-09-21

        Note that when copying your compile log, the right mouse button brings up the correct copy
        menu.

        Wayne

         
    • Wayne Keen

      Wayne Keen - 2007-09-18

      I have seen reports that compiling new projects in your Dev directory can lead to issues like this.

      I keep mine in c:\mycstuff - I would try moving the source, and creating a new project first.

      Wayne

       
    • Wayne Keen

      Wayne Keen - 2007-09-18

      Please note that 'Error 1" basically just means "Something went wrong, I quit"

      It does not mean much in itself. The important lines are these:

      g++.exe: main.cpp: No such file or directory
      g++.exe: no input files

      Wayne

       
      • VampireSilence

        VampireSilence - 2007-09-19

        ok but i didnt understand where devC++ is searching for files and what files it wants to include.
        see if i delete the "#include ..." lines the error is still there !

        VampireSilence

         
    • VampireSilence

      VampireSilence - 2007-09-18

      Yes, right. But i also get this error in an EXAMPLE... !

      VampireSilence

       
      • Wayne Keen

        Wayne Keen - 2007-09-18

        Does your "yes" indicate that you tried what I suggested?

        Wayne

         
    • VampireSilence

      VampireSilence - 2007-09-18

      Yes, i tried to save my project in C:\czeug\ but the error appears again... :(

      VampireSilence

       
      • Wayne Keen

        Wayne Keen - 2007-09-18

        What steps did you do exactly?

        In the future, when you are given a suggestion, please do not

        (1) Ignore it
        or
        (2) Post the equivalent of "I tried it, and it didn't work"

        Tell us, step by step, what you did, like

        (1) I moved the source files to c:\test
        (2) I started Dev, and created a New:Project:Console Application
        etc...
        (3) Post your compile log.

        The point of asking for this information is not to annoy you (that's
        just a fringe benefit ;) - you need to realize that we are not there
        with you, we did not see what you did - and in many cases, like this,
        there are many ways to do something. Some of them may not work as well
        as others.

        Wayne

         
    • VampireSilence

      VampireSilence - 2007-09-18

      ok..

      1. I installead Dev-C++ with all default settings.
      2. I created an "Console App" project.
      3. I saved it in C:\czeug\
      4. I pressed F9 to compile and start the example.
        ~ I didnt change any lines from "Console App" example.
      5. Compiling cancels and the Error appears.

      6. I wrote to this thread ;)

      //*** EXAMPLE

      include <cstdlib>

      include <iostream>

      using namespace std;

      int main(int argc, char *argv[])
      {
      system("PAUSE");
      return EXIT_SUCCESS;
      }

      //*** EXAMPLE END

      Whatever I do the Compiler Log is always exactly the same.

      Compiler: Default compiler
      Building Makefile: "C:\Dev-Cpp\Makefile.win"
      Führt make... aus
      make.exe -f "C:\Dev-Cpp\Makefile.win" all
      g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

      g++.exe: main.cpp: No such file or directory
      g++.exe: no input files

      make.exe: *** [main.o] Error 1

      Ausführung beendet

      VampireSilence

       
    • Wayne Keen

      Wayne Keen - 2007-09-19

      Please do a "Rebuild All" - it is generally a better idea to do that when
      you are debugging. I never in fact use "Compile and Run", because I never
      assume anything that I wrote will compile. ;)

      Wayne

       
      • Wayne Keen

        Wayne Keen - 2007-09-19

        This is a diagnostic step by the way - and my comment about not assuming
        my stuff would compile is making fun of me, not you.

        Wayne

         
    • VampireSilence

      VampireSilence - 2007-09-19

      Ok, I did a "Rebuild All" but the error remains. I also tried to download some updates but it hasnt had any effect.

       
      • Wayne Keen

        Wayne Keen - 2007-09-19

        I wanted to see your log after the rebuild all - please post that every time.

        The reason I asked for it is it still looks to me like part of your project structure
        is stored in the c:\dev-c++ folder....

        Wayne

         
    • Anonymous

      Anonymous - 2007-09-19

      VampireSilence... apt name: http://www.slash7.com/pages

      You failed to re-post your log even when explicitly asked to do so!

      Earlier you said you saved your project to C:\czeug\ but the log you posted clearly shows makefile.win in C:\Dev-Cpp; makefile.win is always generated in the project folder.

      There is a bug that causes projects in C:\Dev-Cpp\ or sub-folders thereof to fail sometimes in exactly teh way yours has. Quite apart from that the root folder of the development tool installation is a really dumb place to store your project. What is more dumb however is the fact that Dev-C++ offers it up as the default location!

      BTW it has nothing to do with #include anything - your code is quite possibly fine, the compiler has not even got to the point of finding your code! main.cpp is the file it cannot find.

      And F9 (compile & run) is only for optimists ;-)

      Clifford

       
    • VampireSilence

      VampireSilence - 2007-09-19

      Of course, the path is C:\czeug\ I just forgot to edit the first log...

      How I can show the compiler where my code is ??

      VampireSilence

       
      • Soma

        Soma - 2007-09-19

        "I just forgot to edit the first log"

        Hah! ^_^

        Soma

         
        • VampireSilence

          VampireSilence - 2007-09-19

          Sure, I didnt want to write down the complete log again :-P

          VampireSilence

           
          • Anonymous

            Anonymous - 2007-09-20

            Write it down!!!

            You copy & paste it you idiot! Please stand away from the computing device!

            If your transcription contains errors it is useless to us (and you)!

            Clifford

             
            • VampireSilence

              VampireSilence - 2007-09-20

              Sry ?? What's your problem ?

              The difference is just the path and I already wrote the right one.

              So please omit your offenses.

              VampireSilence

               
              • Anonymous

                Anonymous - 2007-09-20

                The length of time you took to write that response would have been better spent posting the log as asked. You don't have to do that; but equally no one need provide you with assistance.

                If you are trying to program a computer you should at least first learn to operate one.

                Clifford

                 
              • Wayne Keen

                Wayne Keen - 2007-09-20

                Data should be copied and pasted, not retyped or otherwise manually
                recopied. Simple as that.

                You would be surprised how many people here have wasted people's
                time by retyping stuff, like their code in, typoing things, and
                after having people run the bugs down on their own time, blythy
                and somewhat stupidly say things like - "Oh, that's not in the
                real code that way, I just typo-ed"

                Wayne

                p.s. Clifford and Soma know what they are doing, and are good
                guys. If you find them exasperated with the way you are doing
                things, you need to reset and assume that you are doing something
                wrong.

                 
    • Anonymous

      Anonymous - 2007-09-20

      >> How I can show the compiler where my code is ??

      You already have, the problem you are having is no doubt nothing you have done wrong but a bug. The symptoms you are seeing are those that arise from placing a project in c:\dev-cpp, but that may not be the only cause. The last guy I remember with this problem never resolved it as far as I remember switched to another tool, I may be wrong but he may also have started in c:\dev-cpp. So perhap the problem is stored in teh project file. Scrap it and create a new project file perhaps.

      But really if manual transcription of the log was your first thought ahead of a simple and obvious copy & paste, you should take time out to learn how to use a modern (i.e. post 1990) PC. Presumably you had to copy & paste it from one message to another if you only edited it!? I am not going to diagnose your problem from what you think the log said - it has already been shown to be inaccurate so your position has no credibility at all.

      Clifford

       
    • VampireSilence

      VampireSilence - 2007-09-21

      I already created some new projects. Some examples and some own projects, but the error appeared on every compilation I try.

      VampireSilence

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.