Also question: I've been trying to learn C++ for the longest time now, but I find myself incapable of getting an IDE to work. Thought I had Eclipse figured out awhile ago, but it still failed when attempting to execute the code. Recently gave a lazy attempt to use Code::Blocks (and I'm currently trying again), but it's been to no avail.
I don't know where the question is in all that, but if anyone's interested in listening further and helping me out I'd appreciate it. I've spent a little time using an online IDE just to learn some basics, but I'd much rather continue through not-online means.
If you're on Windows, Code::Blocks and MinGW work well together from my experience.
It's been a while since I set up Code::Blocks, but hopefully these guidelines can help:
- Make sure in Code::Blocks you have set up the compiler by going to Settings --> Compiler (and debugger), with GNU GCC Compiler selected (should be the top one), then in Toolchain executables set the path at the top to where MinGW is located. Should be something like C:\MinGW\bin. Inside of bin should be where mingw32-gcc.exe and other .exe files are at.
- Create a new project, add a new file with a .cpp extension, make a hello world program, build, run.
- Make sure the project's compiler is set to GNU GCC as in the compiler settings menu earlier.
Also question: I've been trying to learn C++ for the longest time now, but I find myself incapable of getting an IDE to work. Thought I had Eclipse figured out awhile ago, but it still failed when attempting to execute the code. Recently gave a lazy attempt to use Code::Blocks (and I'm currently trying again), but it's been to no avail.
I don't know where the question is in all that, but if anyone's interested in listening further and helping me out I'd appreciate it. I've spent a little time using an online IDE just to learn some basics, but I'd much rather continue through not-online means.
Like I stated before in regards to IDEs: they're not necessary for smaller things. Get yourself a lightweight text editor (like Notepad++ or Geany) for writing code and Cygwin for compiling.
I remember I started to learn how to make C# programs without an IDE, using the command line. It was hell. I installed MonoDevelop and it made my life infinitely easier.
I couldn't imagine programming C++ without code completion, (good) debugging, easily linking libraries, and all of the other features of Code::Blocks. I can type "main" and press Alt+A, and it autocompletes the main function, and stuff like that.