Thread: Compiling C Code with Borland

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    19

    Compiling C Code with Borland

    If you haven't read one of my other posts, I am quite new to C. I am taking a class for C and would like to start working on non-class related code. We use a unix term server to write, compile and run our work on. I had suggestions to try Borland compiler but I have no luck with it. I can't seem to get it to do anything and the help documents make no sense. It seems that trying to run the command line compiler just runs and exits. I tried to run it within DOS (for !@#$s and giggles) but no luck.

    Any help>?

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    USA
    Posts
    516
    If you are on a *nix system, why not use gcc
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  3. #3
    uint64_t...think positive xuftugulus's Avatar
    Join Date
    Feb 2008
    Location
    Pacem
    Posts
    355
    Current version of mingw32 on sourceforge.
    Code:
    ...
        goto johny_walker_red_label;
    johny_walker_blue_label: exit(-149$);
    johny_walker_red_label : exit( -22$);
    A typical example of ...cheap programming practices.

  4. #4
    Registered User Kudose's Avatar
    Join Date
    Jun 2006
    Posts
    92
    I would recommend gcc for *nix and Bloodshed Dev C++ for Windows.

    Dev C++ has a Windows installer and is really easy to get up and coding with.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    5
    Quote Originally Posted by Kudose View Post
    I would recommend gcc for *nix and Bloodshed Dev C++ for Windows.

    Dev C++ has a Windows installer and is really easy to get up and coding with.
    I would recomment VC++ 6.0 for any kind c/c++ programs

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    I would recomment VC++ 6.0 for any kind c/c++ programs
    It is outdated - and need the Platform SDK to work correctly, and still has some problems with supporting the new standards... - So when possible - new versions of VS should be used
    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

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by pCBoard.Member View Post
    I would recomment VC++ 6.0 for any kind c/c++ programs
    Plus it's not very standards compliant.
    So 2005/2008 is recommended for Visual Studio.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Jan 2008
    Posts
    19
    Ill try some of these thanks.

  9. #9
    Registered User
    Join Date
    Jan 2008
    Posts
    19
    Ok, I am using Dev C++ and I am trying to compile a simple printf("Hello World"); file but it says it can't find the file? Where do the damn files need to be by default? And what are the files DEV C++ wants?
    Last edited by blackcell; 03-18-2008 at 08:12 AM.

  10. #10
    Registered User
    Join Date
    Jan 2008
    Posts
    19
    I am also limited to something free for commercial use.

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by blackcell View Post
    I am also limited to something free for commercial use.
    Dev C++ and Visual Studio Express are both free of charge/license fee and allows you to use the code in commercial development.

    As to "where the file needs to be", I have no actual knowledge of Dev C++, but I think it does a "project", which means that you are supposed to set up a project definition of some sort. Inside that project, you define your source file.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #12
    Registered User
    Join Date
    Jan 2008
    Posts
    19
    Quote Originally Posted by matsp View Post
    Dev C++ and Visual Studio Express are both free of charge/license fee and allows you to use the code in commercial development.
    Are you sure VS C++ is free for commercial use? I looked under the terms of use and it looked like it said commercial use was a no go.

  13. #13
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Well, if you are new to C I would not worry about the ins and outs of producing commercial software just yet.

    DevC++ is nice for starting out as you can compile individual files w/o a project and the IDE is simple. If you are using Vista there are some issues with privileges and stuff tho.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Visual Studio is nice for starting out and hanging around with since it's really easy and very powerful.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Jan 2008
    Posts
    19
    Ok...I am new to c, program in php at work and want to start building small things 'at work' with C. It needs to be for commercial use.

    I tried DevC but I don't know enough about setting up compilers for the DevC to get it running. I try to compile something and it says can't find file. Doesn't say what it can't find though.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  2. code not compiling w/ "deprecated headers"?
    By kilgorehoffman in forum C++ Programming
    Replies: 4
    Last Post: 12-31-2004, 04:26 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 01:29 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM