Thread: C Programming Compiler

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    19

    C Programming Compiler

    Hi,

    I'm currently at University, were we usethe Borland C++ 5.5 compiler, however, this does not work on Vista which my home computer has.

    I was therefore wondering what C program compiler everyone would recommend which works on Windows Vista?

    Thanks,

    Luke.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by lukesowersby View Post
    Hi,

    I'm currently at University, were we usethe Borland C++ 5.5 compiler, however, this does not work on Vista which my home computer has.

    I was therefore wondering what C program compiler everyone would recommend which works on Windows Vista?

    Thanks,

    Luke.
    VS2008 Express is free, and Pro version maybe available for student - you should probably check in the University...


    you could also read this: http://www.cprogramming.com/compilers.html
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    19
    Downloading VS 2008 now... Thanks.

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    I've downloaded the Microsoft Visual C++ (Visual Studio) thing... It's free. Not sure about whether it's "best" or recommended. I use it at work so I'm used to it. Sort of.

  5. #5
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    Quote Originally Posted by nonoob View Post
    I've downloaded the Microsoft Visual C++ (Visual Studio) thing... It's free. Not sure about whether it's "best" or recommended. I use it at work so I'm used to it. Sort of.
    You downloaded the Express edition, which is a neutered version of the professional version.

    Visual studio is probably the best IDE in the world - there are none that match it on windows, and on Linux, where almost everything is open-source, there are definitely none(That I know of, at least).
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  6. #6
    Registered User bdeepak23's Avatar
    Join Date
    Nov 2008
    Location
    Bangalore, India
    Posts
    4

    Smile Netbeans+Gcc is the answer my friend

    I would recommend Netbeans6.5 with GCC (Cygwin) it is an Opensource/Free Software. Please find the installation details here.

    Code:
    http://www.netbeans.org/kb/60/cnd/setup-Windows.html

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    4
    I use GCC, it is available for all platforms, and it's open source.

  8. #8
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    I second that VS is a fantastic IDE! When I used to screw around with Python my absolute favorite IDE was the free version of Komodo but months later I had to reinstall it and found they weren't offering the free version any more. I tried so many free IDE's and couldn't stand any of them so took to using Notepad++ for code. It was such a joy when I got into C and discovered Visual Studio C++ Express. This is one Microsoft product that I have no gripes with whatsoever (apart from the lack of C99 support of course)

  9. #9
    Registered User
    Join Date
    Mar 2009
    Posts
    19
    I was recommended by the University to get Codeblocks. I've downloaded the Codeblocks file with MinGW (http://www.codeblocks.org/downloads/binaries). However, when i try and compile the 'Hello World' file, nothing happens, and when building i get the following message:

    "vfile1 - Debug" uses an invalid compiler. Skipping...
    Nothing to be done.

    I have the GNU GCC Compiler selected as default. Anyone know what the problem is? Thanks.

  10. #10
    Registered User
    Join Date
    Mar 2009
    Posts
    19
    Solved the issue...

  11. #11
    Registered User
    Join Date
    Jan 2009
    Location
    England
    Posts
    4

  12. #12
    Registered User
    Join Date
    Mar 2009
    Posts
    19
    Well i had it working with simple files such as Hello world. However, when building the following file:

    Code:
    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    
     int get_age(int min_age, int max_age)
    
         {
    
         int age=0;
         while((age<min_age)||(age>max_age))
                {
                printf("\nEnter your age, (between %d and %d):",min_age,max_age);
    
                scanf("%d",&age);
    
                }
    
         return age;
    
         }
    I get the following error:

    Code:
    D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `_WinMain@16'
    Can anyone help me please?

  13. #13
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    The starting point for all C programs is the main() function.

    You don't have one, and the error advises you of that, in somewhat oblique terminology.

  14. #14
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    also - project type is probably wrong - WinMain is for Windows Application

    You need the Windows Console Application to start with...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  15. #15
    Registered User
    Join Date
    Feb 2008
    Posts
    19
    TDM-MINGW:
    http://tdragon.net/recentgcc/
    with Codeblocks
    http://www.codeblocks.org/

    or LCC or PellesC.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  2. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  3. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  4. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM
  5. Bad code or bad compiler?
    By musayume in forum C Programming
    Replies: 3
    Last Post: 10-22-2001, 09:08 PM