Thread: CodeBlocks / GCC / Cygwin Installation Windows 10

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    3

    CodeBlocks / GCC / Cygwin Installation Windows 10

    Hello,

    I am trying to install some C compiler on Windows 10, therefore I found CygWin and CodeBlocks as editor.

    I followed maily this tutorial: How to Install the Latest GCC on Windows

    , also this:
    Chapter 2. Setting Up Cygwin
    and:
    Quick Start Guide for those more experienced with Windows

    I end up with this:

    CodeBlocks / GCC / Cygwin Installation Windows 10-test-cmpile-jpgCodeBlocks / GCC / Cygwin Installation Windows 10-test-cmpile-2-jpg

    When I try to compile this:

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main()
    {
        printf("Hello world!\n");
        return 0;
    }
    nothing happens; when I try to run, I get asked whether I want to build; if I choose so, output is a build error seen in the first image, nothing built.

    I guess, I need some help interpreting this results.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    3,625
    Change the default compiler to the one you are trying to use "Cygwin GCC". (I think you already did this step.)
    Change the project to using the "Cygwin GCC" compiler. (You did NOT do this step.)
    Rebuild your project.

    Edit2: I have never gotten the Cygwin debugger to work; but, I have used the "Cygwin GCC" compiler without any problems on small CB projects. (I am NOT a person who uses the CB debugger very much; so, the debugger problem might be user error on my part.)

    Tim S.
    Last edited by stahta01; 10-10-2016 at 06:01 PM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,687
    That debugger has never worked properly anyway. It might be an
    idea to download and use the GDB debugger instead. I use the
    LCC compiler and the GDB debugger when using CB and they
    seem to work flawlessly.
    Double Helix STL

  4. #4
    Registered User
    Join Date
    Oct 2016
    Posts
    3

    Solution: Disabling Anti-virus

    Quote Originally Posted by stahta01 View Post
    Change the default compiler to the one you are trying to use "Cygwin GCC". (I think you already did this step.)
    Yes.
    Change the project to using the "Cygwin GCC" compiler. (You did NOT do this step.)
    Indeed.
    Rebuild your project.
    Did so.

    Edit2: I have never gotten the Cygwin debugger to work; but, I have used the "Cygwin GCC" compiler without any problems on small CB projects. (I am NOT a person who uses the CB debugger very much; so, the debugger problem might be user error on my part.)
    I downloaded the gdb.exe here: Debugger, gdb, for Windows.

    The solution probably was to disable the Windows Anti-virus. Inspired by CodeBlocks opens console window, then does nothing..

    After doing so, CB successfully compiles upper upper code-snippet.

  5. #5
    Registered User
    Join Date
    Oct 2016
    Posts
    3
    Quote Originally Posted by swgh View Post
    That debugger has never worked properly anyway. It might be an
    idea to download and use the GDB debugger instead.
    Is what I did.
    I use the
    LCC compiler and the GDB debugger when using CB and they
    seem to work flawlessly.
    That sounds like an interesting alternative.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows 7 64b & CodeBlocks
    By Gingitzu in forum Windows Programming
    Replies: 3
    Last Post: 08-20-2011, 10:25 PM
  2. Cygwin SDL windows.h
    By agent933 in forum C Programming
    Replies: 0
    Last Post: 02-09-2010, 02:04 PM
  3. GSL Wrap installation for Windows
    By Carola in forum Windows Programming
    Replies: 2
    Last Post: 10-16-2009, 02:37 AM
  4. Windows Installation Help Needed
    By bennyandthejets in forum Tech Board
    Replies: 4
    Last Post: 03-05-2004, 06:04 AM
  5. Windows xp new installation
    By frednick in forum Tech Board
    Replies: 3
    Last Post: 03-03-2003, 08:31 PM

Tags for this Thread