Menu

Dev-C++ not compiling

2006-05-23
2012-09-26
  • Nobody/Anonymous

    I'm just starting to learn C++, so I don't really have any experience, but whenever I type my line(s) of code then try to compile it, the little screen will pop up and it'll compile it. No problem. But the second time I try to compile anything the box will pop up saying it's compiling, but the little blue line either won't move at all or it'll get stuck on the middle and just sit there until I turn the program off. It's nothing wrong with the code, I'm learning out of a book, and when I restart the computer it'll compile it the first time in a snap. I'm pretty sure it's not my computer, it's a brand new Acer aspire (I don't have the exact model number right now because I'm at school) but it's been really great so far. I think MAYBE the Acer software that came installed on it could possibly be a problem, because I've heard it was buggy from some review? But I was just wondering if anyone else has had this problem aswell, or if anyone has any suggestions. Thank you for your time.

     
    • Nobody/Anonymous

      Nope, I was hoping that was it, but it wasn't.. And I figured I'd take Jims advice and look at other options, when I go to compiler options everytime it doesn't load the screen all the way, and freezes my dev-C++. I'm going to do the clean uninstall right now, and reinstall and see if that works. If everything is still messing up, I'm going to try and download on my moms laptop. If that works then I'm nearly sure it's just my software or something.

       
    • Wayne Keen

      Wayne Keen - 2006-05-23

      What version of Dev are you using, and what OS are you running?

      Wayne

       
    • Nobody/Anonymous

      sorry to say, but that's not very specific, with that sort of "information" we will be hardly able to provide any sort of useful feedback.

      If you consider yourself unable to provide a more detailed description, you should consider providing a couple of screenshots illustrating the problem.

       
    • Wayne Keen

      Wayne Keen - 2006-05-23

      Also, telling us exactly how you are doing your compiles would also help.

      Try to think of things this way - you are talking to people who haven't been there with you, looking over your shoulder, so the level of detail you present in your question has to try to give us enough information to put us "over your shoulder"

      Wayne

      p.s. Keep in mind that terms like "newest" for version are not helpful - version number is.

      p.p.s. You need to make sure that the program you compiled (and presumably ran) the first time is not still running when you try to compile it the second time. That may sound obvious, but I have on a number of occasions forgotten to hit enter to close the display window, and if I don't, its still running.

      p.p.p.s
      "It's nothing wrong with the code, I'm learning out of a book"

      This is a logical fallacy. Code from books can and does, on many occasions have errors, or code that may need tweaking from compiler to compiler.

       
    • Nobody/Anonymous

      The version of Dev-C++ is 4.9.9.2. My OS is Windows xp home edition. To compile I've both went to execute and clicked on compile, and held down ctrl+f9. The program isn't running in the background, I just tried. Sorry my info wasn't very detailed, but now I'm at home so anything further you need I should be able to provide.

       
    • Wayne Keen

      Wayne Keen - 2006-05-23

      Did you run the program after you compiled it?

      Please post your compile log for a successful compilation. Its on the tab labeled "Compile Log", and the right mouse button brings up the copy menu.

      Also, is there an anti-virus running?

      Wayne

       
    • Nobody/Anonymous

      Compile log, you mean when the compile progress box opens up, where it says log? If thats the case it says Compiler: Default compiler
      Because it never does finish compiling, that's what the problem is. ..Wait a minute, whenever you compile, you have to run the program afterwards each time? Or can you compile something, add code to it compile it, and run it again? If you must run the program after everytime you compile, then that's probably what the problem is.. If so, sorry for bugging you with something so silly, I've just NEVER delt with dev-C++ or anything like that. I'll restart my computer and try compiling a few times, while running the program afterwards everytime (I only recall compiling and running directly afterwards a few times, and that was just well testing to make sure it doesn't freeze on me). Oh yes, and I have Norton and Spysweeper running.

       
    • Nobody/Anonymous

      Nah, the first time I compiled it, it worked. Then I ran the program, then I pressed any key. Then when I went to compile it a second time, the compiling progress didn't move anywhere. It's still up now. No progress at all. But, my antivirus may have something to do with it then?

       
      • Nobody/Anonymous

        Ohh, I see the Compile log tab, let me restart my computer again so I can reopen Dev-C++, then I'll post the log. Brb.

         
    • Nobody/Anonymous

      Compiler: Default compiler
      Executing g++.exe...
      g++.exe "C:\Documents and Settings\John\My Documents\CPPAllInOne\FirstProject\main.cpp" -o "C:\Documents and Settings\John\My Documents\CPPAllInOne\FirstProject\main.exe" -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" -L"C:\Dev-Cpp\lib"

      That is the log to the first time I compiled, and the second time won't finish/start.

      When I go to compile (2nd time) The "compile progress" box will pop up as normal. The status says compiling. But unlike the first time, it never does compile. Under the Status: where it says File: and it would normally fill up, and when full say it was done compiling. That section doesn't even move. I'm not sure how to better explain it, I would take screen shots but I'm not even sure how to.

       
      • Wayne Keen

        Wayne Keen - 2006-05-24

        One tbings pops out at me right away. The place where you stored your code:

        C:\Documents and Settings\John\My Documents\CPPAllInOne

        Spaces in the path to your code (or in the path to Dev) are a problem waiting to happen.

        The tools you are using, like GCC and make, have their roots in Unix - and do not always parse spaces well. So places like "My Documents", "Program Files" and your desktop are bad places to store your code. (I think I still mention this in the Please Read Before Posting thread).

        Now, is this your issue? I don't know. But I will tell you that spaces have given rise to more headaches that I have given to my wife before bedtime.

        I keep my code in places like

        c:\mycstuff.

        Wayne

         
    • Nobody/Anonymous

      Aight, I have screen shots, just don't know how to post them. I'm going to send them to my girlfriend and make her put them on her photobucket, then I'll give ye the links.

       
    • Nobody/Anonymous

       
    • Nobody/Anonymous

      No, I just did all of that and tried again, it wasn't my problem. Unfortunately.
      Compiler: Default compiler
      Executing g++.exe...
      g++.exe "C:\mycshit\CPPAllInOne\FirstProject\main.cpp" -o "C:\mycshit\CPPAllInOne\FirstProject\main.exe" -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" -L"C:\Dev-Cpp\lib"
      Anywho, here are links to the screen shots of first compile and second compile. All it shows is that second compile looks as first compile does before it's done compiling. Only problem is, it never does finish compiling. It doesn't freeze my system, nor does it freeze the DevC++ program either. I can't cancel the progress compiling box, but I can check the compile log, and exit the program. blah blah. But even after exiting out of the program, it's still in use, because it doesn't allow me to go back into it to try again without restarting, and restarting takes forever because it will keep making me end task for dev-C++. Anways, here's the links:http://i65.photobucket.com/albums/h221/SushiLovesYou/1stcompile.jpg and shit they turned up real small (BLAH EVERYTHING IS GOING WRONG TODAY) I'll just post this as we resize them or whatever. Hopefully any of this info I gave will help? And again, I'm really sorry for wasting your time. Normally I'd give up by now, but this is something I really need to learn. I could I guess just find some C++ tutorial and going about another way of programming but, what would that do? Aside from me wasting like forty bux on this pos book I bought on C++. I just wish I weren't so new to all of this.

       
    • Wayne Keen

      Wayne Keen - 2006-05-24

      Don't worry, if worst comes to worst, there are some other good IDE's out there, including:

      (1) CodeBlocks

      and

      (2) MinGW Developer Studio

      These are very good tools that you can learn from very well. They use the same compiler as Dev.

      Now

      Several years ago there were some reports of people having difficulties related to using an older version of Norton Anti-Virus that led to some issues that sound similar to what you are seeing, BUT, I have not seen that for 3 or more years - so it was also an old version of Dev as well. Conflicts with anti-virus tools and compilers are not infrequent, and it makes a certain degree of sense, because AV software looks for something that tries to change an executable (among many other things)

      That does raise one more question in my head. You said you were using Dev version 4.9.9.2. I know you also said your machine was new, but did you ever have an earlier version of Dev installed on that machine? Maybe one off a CD?

      Wayne

       
      • Nobody/Anonymous

        Nope, the CD-Rom that pointed me towards Dev-C++ only had a readme telling me how to obtain it (from bloodshed) the only version I've ever had on this computer was 4.9.9.2.
        The Antivirus thing would sound unlikely to me, considering it does compile the file sometimes (well first time) everytime, but then again I don't really know anything. I suppose you're right though, if worst comes to worse I can always try one of those other ones.

         
        • Wayne Keen

          Wayne Keen - 2006-05-24

          "The Antivirus thing would sound unlikely to me, considering it does compile the file sometimes (well first time) everytime, but then again"

          Actually, that is the sort of behavior that an Anti-Virus conflict can give.

          I'll tell you why.

          The first time a file is compiled, the compiler is creating an executable. That is not big deal for AV software. The second time you try to compile, it is "touching" an existing executable program. This is one of the things that AV software looks for for virus activity.

          Now you know everything that I know about the topic.

          One suggestion that will probably not help, but you might try anyway.

          Do a clean uninstall of Dev - see the Please Read thread for directions on doing that. Take your time and thoroughly nuke your installation. Delete all traces.

          Re-download Dev 4.9.9.2 and reinstall.

          See what happens.

          I will be shocked as rancide bovine fecal material if that works, but I have been wrong before this hour.

          Wayne

           
    • Nobody/Anonymous

      http://i4.tinypic.com/10hpu39.jpg and http://i4.tinypic.com/10hq9g2.jpg Maximize both of the windows in able to read it.

       
    • Nobody/Anonymous

      All right, I'll try that in a tiny bit. Then if that still doesn't work I'll try shutting down my antivirus software before using Dev-C++. If neither of those work, I suppose I'll try one of the other "IDE's" unless any other ideas pop up. Thanks again.

       
    • Wayne Keen

      Wayne Keen - 2006-05-24

      Reading between the lines of what you said - an IDE is an Integrated Development Environment - a fancy editor tied in with the mechanicals of the compiler.

      CodeBlocks is the newer of the two that I recommended - it is open source, coded in C++, and has some sharp people working on it.

      In terms of learning resources by the way, in the Please Read thread, there is a section on useful links that has a good number of free online books and tutorials that you might find useful.

      I am off to bed - good luck to you

      Wayne

       
    • Jim W.

      Jim W. - 2006-05-24

      This sounds vaguely familiar. Try this:

      Tools > Environment Options > Interface

      Under "Compilation Progress Window", make sure both boxes are checked. If that doesn't work, try some other options. Good luck.

      -- Jim.

       
      • Wayne Keen

        Wayne Keen - 2006-05-24

        It was ringing some bells here too. Hopefully, that's it sir. If so, we need to write it up in the notes for sure!

        Thanks!

        Waynebozo

         

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.