Im new to programming and want to practice(C++), but for the next couple weeks im living away from home using a friends computer. He doesn't have a compiler on his computer though. I was wondering if by chance, if its possible to save and compile c++ files without an IDE. Ive tried saving notepad files with .cpp, but that doesn't seem to work. Sorry if i sound like a noob, or a complete idiot, just want to program.
Thank You!
Compiling without an IDE
Moderator: Coders of Rage
- JaxDragon
- Chaos Rift Junior
- Posts: 395
- Joined: Mon Aug 04, 2008 2:03 pm
- Current Project: Kanoba Engine
- Favorite Gaming Platforms: PS3, PC
- Programming Language of Choice: C++
- Location: Northeast NC
Re: Compiling without an IDE
For a compiled language like C++, you need to have a compiler.
-
- Chaos Rift Regular
- Posts: 173
- Joined: Thu Feb 11, 2010 9:46 pm
Re: Compiling without an IDE
IDEs and compilers are not the same thing. IDEs are just fancy text editors that include a compiler and a bunch of other useful features to make things easier. A compiler is a program that actually transforms source code into it's compiled form (usually used as a command line tool). So even if you don't use an IDE, you will have to download a compiler to compile your code.
If your friend is weird about you installing things on his PC, perhaps you can find a lightweight IDE that can be run from a USB drive or a Dropbox.
If your friend is weird about you installing things on his PC, perhaps you can find a lightweight IDE that can be run from a USB drive or a Dropbox.
- BugInTheSYS
- Chaos Rift Cool Newbie
- Posts: 88
- Joined: Mon Feb 07, 2011 4:16 pm
- Current Project: Vintage Roads
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++, Delphi
- Location: Pinneberg, Germany
- Contact:
Re: Compiling without an IDE
Furthermore, most IDEs nowadays include compilers - Visual c++ 2010 for example contains a compiler for Windows Operating Systems, Qt includes one for Symbian, etc. But you could just as well edit the source code in Visual C++ and afterwards give some other compiler the code, which will create the executable for another target platform, e.g. for linux or Mac.X Abstract X wrote:IDEs and compilers are not the same thing. IDEs are just fancy text editors that include a compiler and a bunch of other useful features to make things easier. A compiler is a program that actually transforms source code into it's compiled form (usually used as a command line tool). So even if you don't use an IDE, you will have to download a compiler to compile your code.
If your friend is weird about you installing things on his PC, perhaps you can find a lightweight IDE that can be run from a USB drive or a Dropbox.
The only thing IDEs do is let you edit your code and by having you click the Compile and Run button passing the code to its compiler (which you can possibly set up in your IDE options menu) and executing the file that the IDE told the compiler to compile to.
Someday, everything will go to /dev/null. - Bug's prophecy 13:37
Re: Compiling without an IDE
Thank you all!
That really helped me understand the difference between a compiler and an IDE. I thought a compiler was something like Visual Studio 2008.
...and I am considering saving notepad c++ on a flash drive. Otherwise i'll just aim to learn visual basic while i'm here.
That really helped me understand the difference between a compiler and an IDE. I thought a compiler was something like Visual Studio 2008.
...and I am considering saving notepad c++ on a flash drive. Otherwise i'll just aim to learn visual basic while i'm here.
Re: Compiling without an IDE
You can run code::blocks off a flash drive - I've done it and it works great. This is what I recommend.
If you don't use an IDE you'll have to mess with makefiles which can be a pain.
If you don't use an IDE you'll have to mess with makefiles which can be a pain.
- dr-snipe
- Chaos Rift Newbie
- Posts: 42
- Joined: Sun Dec 19, 2010 10:09 pm
- Programming Language of Choice: C++, Java, PHP
- Contact:
Re: Compiling without an IDE
You could use a command line compiler like Borland and just use a batch file to build your programs. But yeah you would have to mess with makefiles to make multiple-file programs.