Answer the question
In order to leave comments, you need to log in
I read about various compilers and settled on gcc, but I don’t understand how to use it?
Hello, I just started learning programming. I read about various compilers and settled on gcc, but I don't understand how to use it at all. Maybe start with an IDE? Or can you offer something of your own?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
You are confusing IDE and compiler, figure out which is which.
Then there are 2 options where to start, it's hard to say which one is "better":
1. Immediately install the IDE (under Windows I would choose Visual Studio, under Linux I would choose Qt, in both cases we are talking about console applications, in Qt create a project through Non Qt Project -> Plain C Project / Plain C++ Project) and learn the language itself. Sometime later, grow (or not grow) to point 2.
2. Start by understanding how it all compiles: install Linux on a virtual machine (if you are under Windows), write code in any notepad (gedit, vim, under Windows notepad++), deal with the console, gcc / g++, include, makefile. Then go to step 1.
Of course, there is a console (including PowerShell) in Windows, you can do without Linux, but in my opinion it would be easier, more natural there.
If this is your first language and there is no programming experience, then I would probably choose the first option. Yes, and I would choose a higher-level language (Python, C #, Java, ...) or at least C instead of C ++, but there are also many points of view on this matter, this is a holistic question
But I think it's better to start with the IDE, anyway, if you work on Windows .
Of course, understanding the tool you use is good, right and useful. But this is simply not necessary to start. You will spend quite a lot of effort on understanding the compilation process without even starting the actual programming.
Therefore, I think that for starters, you can install Visual C ++ Express and start writing code in 20 minutes :)
On Linux , indeed, you can start without an IDE, especially since there are no IDEs for pluses there.
Here we download www.microsoft.com/ru-ru/download/details.aspx?id=40787 IDE Microsoft VS.Express 2013
Here we watch www.youtube.com/watch?v=vR9AWd8N17s Video how to work with IDE VS
Here we download rutracker. org/forum/viewtopic.php?t=3527301 C++ Tutorial
IDE is better not to use yet. If you have Windows, then take Nodepad ++, if linux, then any editor (kate, gedit, vim, emacs, thousands of them). Read articles about what compilation is in general and how C programs are compiled.
Now, if you are under linux (and it is better to be under it), then just enter gcc test.c
and get the executable file.
If under Windows - here it is a little more difficult. Most likely you have mingw installed, then you should write the path to the compiler in the PATH variable, after that you can also use the command gcc test.c
(I don’t remember exactly - they seem to have a different name for the binary).
In general, read the documentation and just articles, there is a lot of information about this.
First you need to understand how C + programs are built in the basic version.
To do this, you should use a code notepad and a compiler with a console interface.
Also understand what the #include directive does and why a linker is needed.
As soon as you understand (a couple of days you dig deeper and you understand at least something), move on to using the IDE.
For C++ the best choice would be microsoft visual studio
Good luck!
PS documentation on gcc is somewhere on the Internet in English, of course. look for
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question