Like Tree2Likes
  • 2 Post By tabstop

Windows 7 64b & CodeBlocks

This is a discussion on Windows 7 64b & CodeBlocks within the Windows Programming forums, part of the Platform Specific Boards category; Hi. So I've been following the code blocks tutorial and I've followed each step precisely, (insofar as I can tell) ...

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

    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
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    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(again..in linux) wasn't installed.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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).
    CommonTater and stahta01 like this.

  4. #4
    Registered User Gingitzu's Avatar
    Join Date
    Aug 2011
    Posts
    2
    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, 12: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21