Menu

make.exe: *** [main.o] Error 1 ? =)

NeoSpring
2006-11-19
2012-09-26
  • NeoSpring

    NeoSpring - 2006-11-19

    Both computers have the same dev-c++ versions 4.9.9.2,
    Both are identical (99%) Installs...

    Computer 1 will not complile, computer 2 compiles and works as it should =)
    Please help, i've searched wide and far and this problem is beyond my ability.

    CPU 1: Win XP Pro, Service pack 2
    CPU 2: Win XP Pro(no service pack)

    -- Compile Logs --
    Computer #1 (half works...I compile, it shows error, but still allows me to "run" it)

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\Self\Makefile.win"
    Executing make clean
    rm -f main.o Project1.exe

    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"

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

    Execution terminated

    Computer #2 (works)

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\Self\Project1\Makefile.win"
    Executing make clean
    rm -f main.o Project1.exe

    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.o -o "Project1.exe" -L"C:/Dev-Cpp/lib"

    Execution terminated
    Compilation successful

     
    • Anonymous

      Anonymous - 2006-11-22

      >> Not quite. Many users, including myself, use the browse option for lib files.

      But his log shows that he is not linking any additional libraries. Invalid paths would be ignored, missing paths would on the errors you have in your example - the OP has no such errors. I suggest that responses should be based on the evidence presented and when personal experience is used, the evidence should be checked to deterimine of teh situation is in fact the same.

      Nonetheless the OP really should have made the build environment the same in both cases for the prurposes of comparison - if only to avoid any doubt.

       
      • Nobody/Anonymous

        He first posted this:
        Computer #1 (half works...I compile, it shows error, but still allows me to "run" it)

        So you are saying that you tested this by copying your projects folder(which resided outside the DevC++ folder) into your DevC++ folder and you also experienced eratic problems just like this.

         
        • Anonymous

          Anonymous - 2006-11-22

          I am saying that a number of people have reported this problem, and found that moving the project solves teh problem. I was sceptical until I created a project myself under Dev-C++ and had the same problem, but it does not seem to happen in all circumstances, some people seem to get away with it.

          It is not a matter of moving a project, the act of creating the project their causes the problem.

          The symptoms being an "Error 1" from make.exe but no apparent error from any commands invoked by make.exe - make issues "Error 1" when a command it executes returns a non-zero error level, so you normally expect to see some other message from the command executed. Here the compilation of main.cpp is shown but issues no error, then make terminated with "Error 1".

          Clifford

           
    • Nobody/Anonymous

      A basic rule with this IDE is to not have your projects reside within the DevC++ directory. Put your projects in another directory outside of the IDE's directory, one WITHOUT any whitespaces.

      error 1 usually means a file needed for the compilation cannot be found(lib, ect)

      If you started a project here: C:\Dev-Cpp\Self\Project1\ and then copied the same project to here: C:\Dev-Cpp\Self\ then the paths are out of whack for the project.

      So, create the myProjects directory as above, and start a new project. If you use an empty project, you will have to link to the needed libs manually. When you get a project all linked up the way you like, create a template of that project for future use.

       
    • Anonymous

      Anonymous - 2006-11-19

      The previous post is correct. It is a mystery to me why, but recently we have seen a number of reports where projects placed in subfolders of the Dev-C++ install folder fail. I have even reproduced the error myself. Moving the project to say c:\devprojects\Self for example seems to solve the problem.

      The fact that you have it working on a system without an SP may provide a clue to the problem - perhaps some MS update. Nonetheless I would suggest that an SP free installation is vulnerable if connected to the Internet and reccommend that you update it.

      I would also suggest that even without the bug, the Dev install folder is not a good place to keep projects - just in case you ever need to delete and reinstall.

      Clifford

       
    • Nobody/Anonymous

      "The fact that you have it working on a system without an SP may provide a clue to the problem"

      SP version had no effect on the problem:

      he used the path <C:\Dev-Cpp\Self\&gt; on one computer,
      and then used the same project in <C:\Dev-Cpp\Self\Project1\&gt; on the other.

      Doing this sort of thing causes the same problem on all my computers - one is updated, the other is not.

      The damage can always be repaired in the project options, but I did not want to get into that with the original poster.

       
      • Anonymous

        Anonymous - 2006-11-20

        Your analysis is flawed, Dev-C++ project files use relative paths, so projects may be moved between paths so long as the relationship between the .dev file and the sources is maintained.

        It may therefore be related to the location only, but not specifically 'any' folder under Dev-C++. This would concurr with my experience and user reports, since I have had some projects fail, and others succeed when placed under c:\dev-c++.

        Clifford

         
    • Nobody/Anonymous

      "Your analysis is flawed"

      Not quite. Many users, including myself, use the browse option for lib files. If you manually browse for a library file in the linker page within project settings, and then move the .dev and the source with it, you will have to change those linking paths. If you have have manually set the paths to the include folders/libs, those will have to be repaired also - aka "delete invalid".

      This is what happened when I moved the project I just compiled up one folder in it's path:

      Compiler: Default compiler
      Building Makefile: "D:\Developer\DevC++\Editor\Makefile.win"
      Executing make clean
      rm -f Object/allwindows.o Object/main.o Object/map.o Object/glDraw.o Object/initialize.o Object/procedure.o Object/camera.o Object/glFonts.o Object/glConfig.o Object/glRefresh.o Object/timerHiRes.o Object/selection.o Object/coords.o Object/win32Font.o Object/assets.o Object/glExtension.o Object/glShader.o Object/debug.o Object/selectionMove.o Object/mouse.o Object/actor.o Object/libraries.o Object/glTnails.o Object/keyboard.o Object/EditorII_private.res Editor.exe

      //Omitted for breverity

      g++.exe -DDEBUG Object/allwindows.o Object/main.o Object/map.o Object/glDraw.o Object/initialize.o Object/procedure.o Object/camera.o Object/glFonts.o Object/glConfig.o Object/glRefresh.o Object/timerHiRes.o Object/selection.o Object/coords.o Object/win32Font.o Object/assets.o Object/glExtension.o Object/glShader.o Object/debug.o Object/selectionMove.o Object/mouse.o Object/actor.o Object/libraries.o Object/glTnails.o Object/keyboard.o Object/EditorII_private.res -o "Editor.exe" -L"D:/Developer/Tools/Dev-Cpp/lib" -L"D:/Developer/Tools/Dev-Cpp/lib/" -mwindows LeanMath.a libTextures.a ../../../Tools/Dev-Cpp/lib/libopengl32.a ../../../Tools/Dev-Cpp/lib/libglu32.a ../../../Tools/Dev-Cpp/lib/libcomctl32.a -Wl,-Map,./Text/MemoryMap.map -g3 -fmessage-length=0

      g++.exe: ../../../Tools/Dev-Cpp/lib/libopengl32.a: No such file or directory
      g++.exe: ../../../Tools/Dev-Cpp/lib/libglu32.a: No such file or directory
      g++.exe: ../../../Tools/Dev-Cpp/lib/libcomctl32.a: No such file or directory

      make.exe: *** [Editor.exe] Error 1

      Execution terminated

      About clues to the IDE's directory woes:
      I use this ide quite a bit. An odd thing I have noticed - many times I will find an empty copy of a project's root folder in various locations. I did not create these empty copies! The location varies and can be anywhere in the devC++ tree, other times in the folder tree where I keep my devC++ projects. Another odd thing is this - I like to copy/paste my current project to another partition on the same computer, and also to another computer. I do this quite often. Many times when I copy the projects folder, I cannot paste because windows will not allow it. When this occurs, simply deleting any file(.h, .txt, .tga, ect..) within the projects tree will allow me to copy/paste the project's folder all of the sudden. These two "odd things" seem to occur when I have used the browsing option for linking/including files, but I can't really say for sure. I am sure these two "odd thangs", and the other directory problems known to the ide are related.

      Michael

       

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.