Compiler that doesn't need to be installed

This is a discussion on Compiler that doesn't need to be installed within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Sounds silly, I know, but atm moment I only got access to a public PC and I really wanna code! ...

  1. #1
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717

    Compiler that doesn't need to be installed

    Sounds silly, I know, but atm moment I only got access to a public PC and I really wanna code! So, could anyone give me a link to a free compiler that doesn't need to install? Or more specific, doesn't need administrative rights?
    Thanks in advance!
    Currently research OpenGL

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    The MinGW port of GCC should fit the bill. You just need to grab the compressed archives and lug them around in a thumb drive. Oh, but maybe you should convert the archives to zip archives instead of the gzipped tarballs that you download.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Ok... I found MinGW on SourceForge, but there is a long list of avaible downloads, which one do I choose? :P
    Currently research OpenGL

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Choose the automated installer. When you run the installer, select the option to just download without installing (but then maybe you would like to install it on your home computer).

    Actually, in a recent thread cyberfish mentioned an unofficial version of MinGW from nuwen.net that is more up to date and comes in one zip archive, so perhaps you would want to try that instead. I have not tried it myself, and it is nonetheless unofficial, but apparently cyberfish has not had trouble with it, so it might be worth a try.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    ok, I DLed that package, and when I tried unpacking it the PC started sounding like a jet engine o.o like, seriously, like it was picking up speed, and stuff, kinda scared me, 'cause it's a public PC and if I blow it up, I have to pay it xP
    Currently research OpenGL

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Quote Originally Posted by Akkernight
    ok, I DLed that package, and when I tried unpacking it the PC started sounding like a jet engine o.o like, seriously, like it was picking up speed, and stuff, kinda scared me, 'cause it's a public PC and if I blow it up, I have to pay it xP
    Clearly, decompressing the archive(s) is hard work But nah, it should be okay. By the way, did you choose the official installer or the nuwen.net one? In either case, to make it easier to use the compiler from the command line, you might want to set the user variables for path to include MinGW's bin directory.

    Oh, and a thought came to mind: I suspect that the Code::Blocks compiler requires admin privileges to install, but maybe one can package it such that admin privileges are not required. That way you would have more than a compiler at your disposal.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    thats just the cpu fan speeding up due to having a load. Although I think the installer woudl count as installing, so best to just find a self extracting zipped version of the MinGW 5.1.4 compiler package.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  8. #8
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    I got the nuwen one, it has loads of .exe files, which I have no idea what to use for o.o ... So, any IDE that doesn't need install? Or just a just a little tutorial on how to compile using this? Like, do I code in Notepad and then use what to compile?
    Currently research OpenGL

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    for mingw, you ned to set the path variable to point to the bin directory

    Code:
    path=%PATH%;c:\mingw\bin
    then you compile by calling mingw-gcc.exe with the correct parameters, see mingw-gcc -h for help
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Quote Originally Posted by Akkernight
    I got the nuwen one, it has loads of .exe files, which I have no idea what to use for
    Most of the files would be supporting the compiler in some way or another. If you want to compile for C, the compiler is gcc (gcc.exe) and for C++ it would be g++ (g++.exe). With only a text editor, you would need to compile from the command line, e.g.,
    Code:
    gcc -o program.exe source.c
    Read the GCC 4.3.2 manual for more information. I assume that you have already followed the installation instructions given by nuwen.net, though a slight modification would be to change the user variables version of the path if you cannot change the system-wide version.

    Quote Originally Posted by Akkernight
    Like, do I code in Notepad and then use what to compile?
    Notepad would be fine, though I would suggest Notepad++ for something more programmer oriented. Download and unzip npp.5.1.4.bin.zip for immediate use.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Yeah, I use Notepad++ at home, just don't want to add too much to this PC :P

    And path variable o.O?
    Currently research OpenGL

  12. #12
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Quote Originally Posted by Akkernight
    And path variable o.O?
    On Windows XP it can be found via: Start -> (right click) My Computer -> Properties -> Advanced -> Environment Variables. The nuwen.net installation instruction states something similiar.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  13. #13
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    ok, this I don't understand xP I found those variables, so I add a new one and enter
    Code:
    path=%PATH%;c:\mingw\bin
    just like that? Also include the "path=" ? and I don't have any mingw-gcc.exe

    Commandline or non-IDE compilation is clearly the worst thing ever invented! >.<
    Last edited by Akkernight; 01-21-2009 at 12:16 PM.
    Currently research OpenGL

  14. #14
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,968
    Quote Originally Posted by Akkernight
    I found those variables, so I add a new one and enter
    If it already exists, update it. The semi-colon is the path separator.

    Quote Originally Posted by Akkernight
    I don't have any mingw-gcc.exe
    It should be gcc.exe then.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  15. #15
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    And by path seperator, it means? I don't have to include what's before it?
    Currently research OpenGL

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  2. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 05:42 AM
  3. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 10:28 AM
  4. Borland command line compiler issues.
    By NinePin in forum C Programming
    Replies: 5
    Last Post: 09-05-2002, 05:44 PM
  5. GNU Public Domain Compiler
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 08-22-2002, 06:55 AM

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