C, C++ Compiler

Discussion in 'Software' started by Cobra, Nov 9, 2004.

  1. Cobra

    Cobra Private First Class

    I am just getting started with C and C++, and I am trying to figure out...
    1) A good compiler
    2) What the file extension is supposed to be when you are done. (.exe, .dll?)
    I hope someone smarter than me can help.

    Thanks!!!
     
  2. Wookie

    Wookie Sergeant Major

  3. QuickSilver

    QuickSilver Corporal

    hehehe me too Wookie - you do the code writing in vi too?
     
  4. BrokenArrows

    BrokenArrows Sergeant

    Your compiler really depends on the system your using. I do most of my c/c++ programming on windows and i use Borland c/c++ 5.02 Development Environment. I dont think you can even buy that anymore its old but it works well. I learned using it so i never changed.

    If you are willing to pay you can get other fancy compilers.

    Some people prefer to write the code in textpad or something simular and then use a command line compiler. But as you are just starting out your probably better off with a propper IDE.

    There are many free ones on the net just look around, download them and see which one works for you.
     
  5. Wookie

    Wookie Sergeant Major

    no I use notepad, I installed emacs but it doesnt work.


    Cobra im assuming you are using Windows but Linux has many many free alternatives my fav being kdevelop.
     
  6. Cobra

    Cobra Private First Class

    I tried the Cygwin one, and I can't figure out how to make it convert the files to exe or dll
     
  7. Wookie

    Wookie Sergeant Major

    gcc myfile.c -o myexe.exe



    then

    ./myexe.exe



    Cygwin is a linux environment emulated unde wndows you cant execute the exe's from DOS unless you configure it to.
     
  8. glennk721

    glennk721 MajorGeek

    Hello this is from a older post but hope you find it helpfull , Glenn



    I have uploaded a C++ Programing Guide to my webserver, its a PDF ebook,,,you will need a utility such as Winzip to open the file,and then A PDF File Viewer hope you find this helpfull , Glenn
     
    Last edited by a moderator: Nov 13, 2004
  9. Cobra

    Cobra Private First Class

    #include <stdio.h>

    int main() {
    printf("Hello World!\n");
    return 0;
    }

    This is what I put in the myself.c file. I type in c:/myself.c -o myexe.exe

    All it does is say: c:/myself.c: 3: Syntax error: "(" unexpected

    I don't know what that means and I don't know how to fix it.
     
  10. Wookie

    Wookie Sergeant Major

    try
    gcc c:\myself.c -o c:\myexe.exe
    ./myexe.exe
     
  11. Cobra

    Cobra Private First Class

    I tried that command and the same error message came up.
     
  12. animatorStrike

    animatorStrike <a href="http://www.acrodata.com/fun/waaa.jpg">Rid

    Try Cprogramming. They have a list of good compilers and some of them are free.
     
  13. glennk721

    glennk721 MajorGeek

    Sorry Abby, Found on the internet in a google search, Glenn
     
  14. NeoNemesis

    NeoNemesis Moutharrhea

    Have you tried using the regular gcc program. With the intereface? Thats what I use and it works well. Instead of using the command. just type in rhide i beleive.
     
  15. Cobra

    Cobra Private First Class

    I downloaded the Borland C++ compiler 5.5. I start the installation program and it says I need to free up 50.79MB of space on C:. The problem is that there is 16 GB free on C:.
     
  16. animatorStrike

    animatorStrike <a href="http://www.acrodata.com/fun/waaa.jpg">Rid

    I would recommend either Dev-C++ or GCC, but I haven't tested out GCC.
     
  17. NeoNemesis

    NeoNemesis Moutharrhea

    http://www.rhide.com/

    Go there, and download the thing called djgpp. and also get rhide. be sure to read on how to install rhide in the documentation area. then open the command prompt, type in rhide, and it will go. no need for anythign esle. if you installed right you can compile right trhough rhide.
     
  18. Cobra

    Cobra Private First Class

    I finally got the Borland one to work. When I go to compile a file this is what I type in the address bar when I get into the bin folder: bcc32 myself.c

    It doesn't create a file anywhere in that same folder. Is there supposed to be another file created after you do that?
     
  19. Cobra

    Cobra Private First Class

    Ok, after messing around with it a while I finally got it to go.
    Thanks for you help
     
  20. Athron64

    Athron64 Private E-2

  21. rmStar-R

    rmStar-R Private E-2

    Devcpp is cool. though i rarely use the project maker.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds