Menu

a problem with compiling

sucre
2008-12-20
2012-09-26
  • sucre

    sucre - 2008-12-20

    hello,
    i installed devcpp 4.9.9.2 and i have a problem compiling simple programs,
    it says when i try to compile that crt2 no such file or directory.
    and by the way i have vista installed.
    what could be the problem?
    thanks a lot for the help.

     
    • cpns

      cpns - 2008-12-22

      Thanks for confirming that.

      The lesson is that saying you followed instructions is not sufficient, you have to tell us what you did, because instructions can be ambiguous, or misunderstood. The log indicated that you had misunderstood the instructions, which is why we always ask for the log, it contains more information and indicators than many people believe, and is the single most essential diagnostic tool. More importantly is says precisely what happened, rather than your interpretation or idea of what happened. Often you could post a log without even bothering to ask a question and you'd get an answer.

      Clifford

       
    • Wayne Keen

      Wayne Keen - 2008-12-21

      It looks like you didn't read the thread titled (not accidentally) "Please Read Beefore Posting a Question" - it tellss yoy the special things that you have to do if you have Vista, and it also tells you about thee "Basic 3" - the information to include with your question.

      Please do so, it will beworth your while! :)

      Wayne

       
    • sucre

      sucre - 2008-12-21

      i did as it suggested in the forum but still i am not able to compile any program.

       
      • cpns

        cpns - 2008-12-21

        No you did not. You were asked to read the " PLEASE READ BEFORE POSTING A QUESTION" thread, and to post the necessary vital information. We have two out of three, but you still have not posted the Compile Log text.

        It the other thread you posted to I also said to note down exactly what you did, not to simply say you did what it said, or to copy what it says - what did you do? Moreover Wayne repeated that request.

        Finally I agree with Wayne, you have to really want to use Dev-C++ specifically to even bother to get it to work on Vista. There are better alternatives. I don't even bother to install it any more.

        Clifford

         
    • sucre

      sucre - 2008-12-21

      well i will specify excatly what i did in order to understand better.
      in the begining i had the error of not suceeding in excuting the gcc file.
      so i added almost every possinle link to the directories in the compiler options.
      now i have the excat log error while trying to compile:
      ompiler: Default compiler
      Executing gcc.exe,c:\dev-cpp\bin...
      gcc.exe,c:\dev-cpp\bin\ "C:\Users\a\Desktop\Untitled1.c" -o "C:\Users\a\Desktop\Untitled1.exe" -I"C:\Dev-Cpp\include" -I"C:\Dev-Cpp\libexec" -I"C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2" -I"C:\Dev-Cpp\mingw32\lib" -I"C:\Dev-Cpp" -I"C:\Dev-Cpp\mingw32" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\bin" -L"C:\Dev-Cpp\lib" -L"C:\Dev-Cpp\libexec" -L"C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2" -L"C:\Dev-Cpp\mingw32\lib" -L"C:\Dev-Cpp" -L"C:\Dev-Cpp\bin"
      Execution terminated

      thanks for the help.

       
    • cpns

      cpns - 2008-12-22

      > well i will specify excatly what i did in order to understand better.

      You seem to have missed that part out and specified nothing.

      > Executing gcc.exe,c:\dev-cpp\bin...

      Well you have screwed that up right there. It is trying to execute a program called "gcc.exe,c:\dev-cpp\bin.exe" which is obviously invalid. Which is exactly why I asked for precisely what you did: i.e. what text did you type into which dialog fields etc. It should be: "c:\dev-cpp\bin\gcc.exe".

      > so i added almost every possinle link to the
      > directories in the compiler options.

      In other words you did stuff not specified in the solution? Why!?

      You have added a large number of library and include search folders in your apparent attempt to get this to work, but that is not the problem that you need to solve. The problem with Vista is one of finding the tool-chain binaries, not the pre-processor finding header files, nor the linker finding libraries. All you have done is add unnecessary search paths without any understanding of why you are doing it.

      > now i have the excat log error while trying to compile:

      Interestingly that log does not indicate any error. I assume because it did not actually run anything to cause an error.

      > C:\Users\a\Desktop\Untitled1.c
      Don't build your projects on the desktop.

      Clifford

       
    • sucre

      sucre - 2008-12-22

      i didn`t change nothing in the programs tab under compiler options.
      but i added the following things to the other tabs:
      in the directories tab :
      under binaries tab i added:

      C:\Dev-Cpp\libexec
      C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2
      C:\Dev-Cpp\mingw32\bin
      C:\Dev-Cpp\bin

      under linaries tab :
      C:\Dev-Cpp\lib
      C:\Dev-Cpp\libexec
      C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2
      C:\Dev-Cpp\mingw32\lib

      under c includes:
      C:\Dev-Cpp\include
      C:\Dev-Cpp\libexec
      C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2
      C:\Dev-Cpp\mingw32
      C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include

       
    • sucre

      sucre - 2008-12-22

      and now i have a differnet error log:
      Compiler: Default compiler
      Executing gcc.exe...
      gcc.exe "C:\q1.c" -o "C:\q1.exe" -I"C:\Dev-Cpp\include" -I"C:\Dev-Cpp\libexec" -I"C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2" -I"C:\Dev-Cpp\mingw32" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -L"C:\Dev-Cpp\lib" -L"C:\Dev-Cpp\libexec" -L"C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2" -L"C:\Dev-Cpp\mingw32\lib"
      ld: crt2.o: No such file: No such file or directory

      Execution terminated

       
    • cpns

      cpns - 2008-12-22

      But I have already identified your problem; have you fixed it yet? Let me be clear: where the instructions said:

      > 2)go to the programs tab and add c:\dev-cpp\bin\ to all the listings.

      it means to prefix each executable with its file path rather than relying on Vista to find it using the PATH environment variable. You appear to have done:

      gcc.exe,c:\dev-cpp\bin\

      rather than

      c:\dev-cpp\bin\gcc.exe

      and similarly for the other binaries.

      Adding additional paths to the includes and libraries is pointless - why would you do that rather than follow the instructions and then post teh log here for analysis when it failed? The Vista problem is about Vista correctly locating the toolchain executables, and the solution is to explicitly specify the path of each executable. In hindsight perhaps step (2) is somewhat vague, but I guess the author expected some understanding of computers from anyone attempting to program one.

      Cliffford.

       
    • cpns

      cpns - 2008-12-22

      > and now i have a differnet error log:

      That is exactly because because you have undone the actual fix! Apply step (2).

      Clifford

       
    • sucre

      sucre - 2008-12-22

      clifford i have done as u said and now it works perfectly!
      thanks a lot for the help....
      sucre.

       

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.