How do I compile cpp manually
This is a brief introduction to the operation of the GNU C ++ Compiler. It is not an introduction to the language C.. For this I refer to the literature mentioned below. The compilation of C ++ programs for the terminal mode of Linux is discussed. The graphic programming of X-Windows by means of the Qt3 / Qt4 graphics library can be found in the KDE or Qt books in the appendix.
The language C and C ++ are the standard languages in Linux, although practically every modern computer language is available in Linux. UNIX and C are closely related. The C language was invented by Kerningham and Ritchie in 1972 specifically for the development of UNIX. It has developed in several stages since then. The old Kerningham / Ritchie standard is practically no longer used because it can lead to very illegible programs. Anyone who programs in C today should adhere to the ANSI-C standard.
The C ++ language was developed by Bjaarne Stroustrup in 1985. It too has gone through several stages of evolution to this day. Today the ANSI C ++ 3.0 version is the newest standard. C ++ extends the C language to include the concepts of object-oriented programming. These are the formation of classes (data encapsulation), inheritance, polymorphism, the overloading of operators and much more. However, every C ++ compiler can also work as a C compiler, which means that a migration from C to C ++ is possible.
Linux itself is not written in C ++, but in C with smaller assembler parts. C is ideal for developing operating systems, as it can generate highly optimized code without necessarily having to resort to assembler. The C code is very portable, so that Linux is available today on practically every type of CPU. The C ++ language is used, for example, in the Qt graphics library.
The compiler gcc 4.2.1
using namespace std;
I don't want to explain the program explicitly here. You can learn C or C ++ in our LINUX group. Simply enter the source code and save it under versuch.cpp.
1st translation attempt
Enter the command:
2. Translation attempt
Enter the command:
Generate debugable code
A machine program does not inherently contain any debugable code. Unless you love uncommented machine code. To debug C ++ programs, the C ++ compiler must append a symbol table with variables and line information to the code.
With the compiler option -G we tell the GNU compiler to append this symbol table to the code.
Enter the command:
The GNU C ++ compilers know a huge number of compiler options, one could write an entire book about them. I would like to name just a few:
Graphic programming under Linux:
C ++ GUI programming with Qt3
Jasmin Blanchette (English)
Prentice Hall 2004
(very current with Qt 3.2)
The Qt book
SuSE Press 2001
Markt + Technik Verlag 2001
KDE and Qt programming
Programming with Qt 2nd edition
O'Reilly Publishing 2001
Franzis Publishing House
C / C ++ programming:
C programming under Linux
SuSE Press 2002
Now I'm learning C ++
Markt + Technik Verlag 1999
(very nice book for beginners)
C / C ++
Markt & Technik Verlag
(Reference book C / C ++ syntax)
- Is pulpy orange fat
- What is the correct pronunciation of the vowel
- Why can people walk on the moon
- Is language important for literature
- What do you need for a vacation
- How can I aim for more social capital
- May corn syrup help with constipation
- In which country is racism particularly strong?
- How can we update our research knowledge
- What is parallel economy
- Where do international pilots go on vacation?
- What memos in life have you missed
- How does SEO improve
- What is the full form of RPSF
- How often do you change your clothes
- Can yeast water and sugar make alcohol
- How do I record qualitative data
- Who often says nice things to you
- You can spray paint over finished wood
- How did Christopher Columbus discover Puerto Rico?
- Is the Boeing NMA overrated
- What are the best Eric Prydz songs
- Apple is ahead of its time
- Who gave the theory of asymptotic notations
- Should I use OpenGL?
- You can add vermicompost to dates
- Is a passive voice an action verb
- Why is HTML known as a markup language
- Who comes first people or animals
- What is an option price
- Why should you eat pancakes?
- What is the Japanese term for sure
- Why shut down torrent
- Can foreign language learning be automated