Menu

Need Quick Help

regi_dg
2007-08-24
2012-09-26
  • regi_dg

    regi_dg - 2007-08-24

    I've read as much as I can, and I'm running out of time, so I hope you don't mind helping me. I'm a C programming student, and need a compiler, ASAP. I downloaded Dev-C++ before I enrolled in my class, found a tutorial online and tried it out. I couldn't get it to compile. I thought it was probably something I was doing, and thought I'd get around to fixing it. Now, I NEED it, as soon as I can so I can execute my programs.

    Okay, now for my big three:

    1) I'm running version Dev-C++ 4.9.9.2; Vista Home Premium.

    2) My simple program...

    / Regi G
    My First C Program
    8/21/07
    COP 3223 Rocks!
    /

    include <stdio.h>

    int main(void) {

    printf(&quot;COP 3223 Rocks!\n&quot;);
    return 0;
    

    }

    ////////////////////////////////////
    I've also tried the sample Hello program that came with my download of Dev-C++ and get a similar error.

    include <iostream>

    using namespace std;

    int main (int argc, char *argv[])
    {
    char quit;

    quit = '\0';
    while (quit != 'q')
    {
        cout &lt;&lt; &quot;Hello ! This is a console app.&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;To create a console, go to Project Options and select&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;\'Win32 Console\'.&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;Press q to quit &quot; &lt;&lt; endl;
        cin &gt;&gt; quit;
    }
    
    return 0;
    

    }

    ////////////////////////////////////////////////////////////////////////////////////

    3) Complete Compile Log output on my program:

    Okay, it doesn't want to c/p.

    Compiler: Default compiler
    Building Makefile: "C:\Users\Regina\Desktop\COP3223\Makefile.win"
    Executing make...
    make.exe -f "C:\Users\Regina\Desktop\COP3223\Makefile.win" all
    gcc.exe -DDEBUG -c hello.c -o hello.o -I"C:/Dev-Cpp/include" -ansi -traditional-cpp -g3

    gcc.exe: installation problem, cannot exec `cc1': No such file or directory

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

    Execution terminated

    ///////////////////////////////////
    For the example file:

    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\Examples\Hello\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp\Examples\Hello\Makefile.win" all
    g++.exe -DDEBUG Hello.o -o "Hello.exe" -L"C:/Dev-Cpp/lib" -lobjc -g3

    C:\Dev-Cpp\Bin..\lib\gcc\mingw32\3.4.2........\mingw32\bin\ld.exe: cannot find -lobjc
    collect2: ld returned 1 exit status

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

    Execution terminated
    //////////////////////

    I read something about downloading "this" and "that" and "make these adjustments" but I don't know what I actually need and don't have time to keep researching and trying out. I'd like to start writing more complex programs, so I can get necessary practice in. Plus, those instructions were confusing and I didn't know how to get someone's attention for help.

    I did uninstall and reinstall from SourceForge, as I couldn't remember where I got the last download, and hoped I had an incomplete installation package or else I chose the wrong settings. I accepted all suggested settings, didn't change a thing, and still have the problem.

    I appreciate whatever help you can give.

    Thanks,

    Regi dG

     
    • Wayne Keen

      Wayne Keen - 2007-08-24

      "I read something about downloading "this" and "that" and "make these adjustments" but I don't know what I actually need and don't have time to keep researching and trying out."

      The directions for setting things up with Vista that the "Please Read" thread have for getting going
      with Vista are pretty specific. There's really not much to research there. Do them. If they work,
      fine, if not, then report back on exactly what steps you performed (don't simply state that you did
      what they said) and exactly what happened - you Basic 3 again.

      Vista created some definite issues for MinGW, and you will have to do some twiddling. If that is not
      in line with your needs, then you might want to look into the free version of Visual C++.

      Wayne

       
    • regi_dg

      regi_dg - 2007-08-24

      Okay, this is what I get out of your post there (quoted below): If I'm working from the command line, do "this." I'm not working from the command line and hope I don't have to before I get to that level of programming, but I still need to change the path? I've changed the path on another program so I can do it, but I had a lot of trouble with that program (probably endemic to that package) and am not looking for a repeat, so I'm just double-checking with you before I go through that trouble.

      I have another question on the environment variables path: Do I need to start a command line window to initate the path if I'm not using the command line, or does it not apply because I'm not using it at all (just that the open command line window hasn't updated with the info for those using it?) That sounds like a DQ, but I'm at the place where simple logic is difficult sometimes.

      If that's all I was supposed to get out of the instructions, I ask for your grace, because I've been reading until my eyes are about to bleed. (Not a comp-sci major and mine requires loads of reading deep stuff.)

      On downloading MinGW--I was sincerely hoping not to HAVE to do that, also. Just one more thing that can "break." So, to clarify, again, and probably ticking you off, is it recommended that I do this step, also?

      ~~~~~~~~~~~~

      Quoted from drwayne:

      If you want to use things from the command line - then you are effectively using
      MinGW by itself. Then things become like any other application. You need to
      make sure that things are in your system's path.

      If you do a quick search for cc1 in your Dev directory, you will find the path
      to it. Then, in your systems environment variables, add the path to cc1 to your
      path - you can do that for either your user or system path.

      Note that this will not change your path until you start a new command window.

      Note also, that if you are going to be doing a lot of programming from the command
      line, I would use MinGW and MSYS. MSYS, which stands for Minimal System, gives you
      a nice environment for doing command line work.

      Now, here is a tidbit that might be worth the price of admission. If you get MinGW
      here:

      http://nuwen.net/mingw.html

      You get a version of MinGW that not only has a newer compiler (gcc-4.1.2), but also
      has some nice add-in's like boost already there AND has the patched version of the
      MinGW runtime that deals with the issues that cause the path issue that you are
      having.

      You just download the MinGW from there, unzip it, place it in c:\mingw - then add
      c:\mingw\bin to your path, download MSYS from here:

      http://www.mingw.org/download.shtml

      install it, during installation, it will ask you where MinGW is, tell it where, and you
      are set with a nice, stand-alone command line environment.

      Wayne

      p.s. posting your raw email here is a bad idea - spammers harvest them all the time
      from places like this

       
      • Wayne Keen

        Wayne Keen - 2007-08-24

        Uh, no. You went to the second discussion on Vista. This is the first one:

        http://sourceforge.net/forum/forum.php?thread_id=1715032&forum_id=48211

        with the specific directions.

        Wayne

         
        • Wayne Keen

          Wayne Keen - 2007-08-24

          Duh, what an idiot. I grabbed the wrong link. The above will work for a seperate installation of MinGW, but here is the one (even earlier in the thread) dealing with getting baseline Dev up and going:

          http://sourceforge.net/forum/message.php?msg_id=4156252

           
    • regi_dg

      regi_dg - 2007-08-24

      Thank you for the information. :) No worries about the mistake. I now have permission to nearly all my files on my own computer. Why does Vista do that? sheesh

      I'm currently downloading the new package.

      Question on this part:

      1)add "C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2" to the binaries location under the directories tab
      2)go to the programs tab and add c:\dev-cpp\bin\ to all the listings.

      Are these in Dev-C++ itself?

       
    • regi_dg

      regi_dg - 2007-08-24

      1) Same as above.

      2) Same as above, but I'm only including the Compile Log for the following example program:

      include <iostream>

      using namespace std;

      int main (int argc, char *argv[])
      {
      char quit;

      quit = '\0';
      while (quit != 'q')
      {
          cout &lt;&lt; &quot;Hello ! This is a console app.&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;To create a console, go to Project Options and select&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;\'Win32 Console\'.&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;Press q to quit &quot; &lt;&lt; endl;
          cin &gt;&gt; quit;
      }
      
      return 0;
      

      }

      ////////////////////////////////////////

      3)
      Compiler: Default compiler
      Building Makefile: "C:\Users\Regina\Desktop\COP3223\Makefile.win"
      Executing make...
      make.exe; c:\dev-cpp\bin\ -f "C:\Users\Regina\Desktop\COP3223\Makefile.win" all
      Execution terminated
      /////////////////

      Under "Information" in the compile log, I got "Total errors 1."

       
    • regi_dg

      regi_dg - 2007-08-24

      Thought I should go ahead and add the other program, again.

      / Regi G
      My First C Program
      8/21/07
      COP 3223 Rocks!
      /

      include <stdio.h>

      int main(void) {

      printf(&quot;COP 3223 Rocks!\n&quot;);
      return 0;
      

      }

      /////////////////////////////////
      Compiler: Default compiler
      Building Makefile: "C:\Users\Regina\Desktop\COP3223\Makefile.win"
      Executing make...
      mingw32-make; c:\dev-cpp\bin\ -f "C:\Users\Regina\Desktop\COP3223\Makefile.win" all
      Execution terminated

       
    • regi_dg

      regi_dg - 2007-08-24

      Weird, the compile log for the example program didn't copy...Trying again...

      Compiler: Default compiler
      Building Makefile: "C:\Users\Regina\Desktop\COP3223\Makefile.win"
      Executing make...
      mingw32-make; c:\dev-cpp\bin\ -f "C:\Users\Regina\Desktop\COP3223\Makefile.win" ../../../../Dev-Cpp/Examples/Hello/Hello.o
      Execution terminated

       
    • regi_dg

      regi_dg - 2007-08-24

      Okay, I'm officially on the outs with this program. I've followed the advice of both posts and NADA! That would be the fourth uninstall I've done. GRR!!!

       
    • Anonymous

      Anonymous - 2007-08-24

      It seems you posted five posts in in rapid succession without waiting for a response to either. It seems you do not have much patience.

      If you want an easy life I suggest that you download Visual Studio C++ 2005 Express Edition, you'll have fewer problems. It is a large download, so you'll at least have to fix the impatience problem.

      Clifford

       
    • regi_dg

      regi_dg - 2007-08-24

      ROFL! Clifford. It has nothing to do with patience. Well, as a matter of fact, I realize that those posting here probably have better things to do than to babysit me, and I do need to get this running, so I thought I'd update as I went.

      Yes, I'm frustrated with the program, not with the help I have received.

      VC++ Express worked a number on my old system, so I'm rather loathe to try it again. Everytime I opened the program, it crashed my computer. No thank you.

       
    • Soma

      Soma - 2007-08-25

      It seems to me that you have added "%Dev-C++CDirectory%\bin" not only to the search directories but to the names of the binaries to execute as well. This is incorrect. The directories in question should only be added to the different search paths. If memory serves the problem in question is solved in the third tab from the directories tab of the environment window.

      Wayne, I believe, continues to use Dev-C++ and can probably give you more information.

      Soma

       
    • regi_dg

      regi_dg - 2007-08-25

      Thanks, Soma. I thought I was following the directions verbatim, but perhaps I misread. It wouldn't surprise me.

      I added those to the Tools -> Compiler Options -> Programs tab, I believe.

      Okay, then, so as not to mislead...I have expanded my time to work on this as I decided to try to install to me old system which has XP on it. It went off without a hitch, so at least I have home access to a compiler. I just wanted to have it on my laptop because the kids use that computer for a variety of things.

      Anywhoo, I double-checked the path and made sure the extra command was removed from where I think I put them before...I think it was the MinGW/bin, for some reason.

      Oh, yeah, here it is, http://sourceforge.net/forum/message.php?msg_id=4156252:

      I think I combined the two, and perhaps you can see what's happening.

      I did the uninstall, but didn't even think about the .ini and .cfg files. So, I went back to check them out, and can't find them, but they must be there, because I am having remnants on new installs.

      What have I done to find them? I have done a search from the Start menu. I've opened Computer and searched. I did advanced search and made sure to look in hidden files (selected the checkbox). I can't remember where it is but there was another place where you can select to look for hidden files and ran that search. I also went into the Control Panel and found that under File Options, all possible views were selected, including hidden and system files.

      I've gone into as many individual folders as I thought might store the .ini and .cfg files, and some that seemed unrelated, and haven't found them. I also searched for the file suffixes only to pull up all those file types and none seemed to have anything to do with devcpp.

      Oh, and just to add...I also searched for the path suggested in the comments here (/Documents and Settings/Username/local settings/application data), but all I found was a folder under my usernae called "AppData" with a daughter file "Local." I checked, no...

      OMG. I just found them.

      AppData/Roaming/Dev-Cpp/

      I think they're both in there. I'll be back.

      Sorry for all the rigamaroll! I'm usually more together than this. Wah!

      Regi

       
    • Anonymous

      Anonymous - 2007-08-25

      Newer versions of Dev-C++ do remove teh config files I think, so you may not find any. If you are getting "remnants" of old installs, it may be because you are using an old project. Project files inherit settings from the global configuration, and then keep them. They are plain text files and could be edited manually or use the IDE to modify the settings in teh Project-Project options dialog.

      I have installed VC++ 2005 EE on many computers without problem. On Vista you need a service pack (although that may now be included in the latest download). It at least has a working debugger! ;-)

      There are other alternatives if Dev-C++ continues to frustrate:
      wxDev-C++ (a derivitive, with some bug fixed not in Dev and a GUI tool/library)
      Code::Blocks (merely competent IMO)
      Eclipse (need to add compiler, works well with MinGW, if you can stand Eclipse!)
      Ultimate++ (frankly just weird)

      Clifford

       

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.