Compiling without an IDE

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Dominger
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 4
Joined: Tue Jun 14, 2011 1:06 pm

Compiling without an IDE

Post by Dominger »

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!
User avatar
JaxDragon
Chaos Rift Junior
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

Post by JaxDragon »

For a compiled language like C++, you need to have a compiler.
X Abstract X
Chaos Rift Regular
Chaos Rift Regular
Posts: 173
Joined: Thu Feb 11, 2010 9:46 pm

Re: Compiling without an IDE

Post by X Abstract X »

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.
User avatar
BugInTheSYS
Chaos Rift Cool Newbie
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

Post by BugInTheSYS »

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.
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.
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
Dominger
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 4
Joined: Tue Jun 14, 2011 1:06 pm

Re: Compiling without an IDE

Post by Dominger »

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. :oops:
...and I am considering saving notepad c++ on a flash drive. Otherwise i'll just aim to learn visual basic while i'm here.
User avatar
bnpph
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 75
Joined: Thu Mar 10, 2011 12:30 pm

Re: Compiling without an IDE

Post by bnpph »

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.
User avatar
dr-snipe
Chaos Rift Newbie
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

Post by dr-snipe »

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.
Post Reply