Thread: Windows 7 64b & CodeBlocks

  1. #1
    Registered User Gingitzu's Avatar
    Join Date
    Aug 2011

    Windows 7 64b & CodeBlocks

    Hi. So I've been following the code blocks tutorial and I've followed each step precisely, (insofar as I can tell) including installing the minGW version. The code (as is in the tutorial) seems to build fine (0 errors, 0 warnings) but it doesn't run. At least that's what I thought until I found the actual executable in the \bin\ folder and double-clicked it. I notice that the console does appear for about a millisecond.

    If it helps I'm running Windows 7 64bit. As for compilers & settings I'm using whatever defaults were in place when I installed.

    Any help will be much appreciated.

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Try and run Codeblocks from the console to see if any errors are shown when the exe is supposed to be running.
    Specifically look for something like "Console Runner" in the error.

    I had such a problem (although in linux) and found out that the required terminal (xterm) to which consolerunner points by default( linux) wasn't installed.

  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    You hit Ctrl-F9 to build and Ctrl-F10 to run the program. If you run it from inside C::B, then C::B runs a batch file that will "keep the window open". Or you can use your computer in the way it was intended, by getting a cmd window open and then typing the name of your program (after navigating to the proper directory).

  4. #4
    Registered User Gingitzu's Avatar
    Join Date
    Aug 2011
    Thanks guys. Running the executable from the command window did indeed work, proving that the compiler is working fine. Any idea why the window doesn't stay open when I execute from Code::Blocks? Some sort of batch file setting perhaps?

    [EDIT] I have good news & bad. The good news is I've solved the problem. The bad news is I'm not sure how After my most recent post I decided to have a look at Code::Blocks' "Settings>Compiler and debugger..." to see if anything leaped out at me. The first thing I noticed was that GNU GCC was not the default compiler, so I went ahead and changed that before hitting the "reset defaults" button. I'm fairly sceptical that either of these things made a difference but hey! If it's working, I'm done complaining.

    The lesson: when in doubt, hit reset!
    Last edited by Gingitzu; 08-20-2011 at 10:50 PM. Reason: Problem Solved (I hope!)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with codeblocks
    By SilverClif in forum Windows Programming
    Replies: 6
    Last Post: 05-24-2011, 05:12 AM
  2. using codeblocks
    By torquemada in forum Tech Board
    Replies: 7
    Last Post: 04-20-2011, 08:57 PM
  3. Roulette in Codeblocks 10.5
    By Parid in forum C Programming
    Replies: 11
    Last Post: 12-19-2010, 01:53 PM
  4. gcc vs CodeBlocks compiler
    By CDdotdot47 in forum C Programming
    Replies: 8
    Last Post: 08-13-2010, 12:43 PM
  5. Codeblocks.
    By Kitt3n in forum C++ Programming
    Replies: 5
    Last Post: 05-16-2010, 01:50 PM