In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to configure C or C++ lightweight graphical development environment under Ubuntu 20.04". The content in the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought to slowly deepen, to study and learn "how to configure C or C++ lightweight graphical development environment under Ubuntu 20.04" bar.
This short tutorial shows you how to install a C compiler and a text editor for C programming on Ubuntu. Compiler is GNU GCC, editor is Geany. Don't worry, this tutorial is designed for beginners and easy to follow. I'll show you how to compile the .c source code file until it is executed using Geany. Enjoy learning! Geany is a free, fast, lightweight cross-platform IDE that works with very few dependent packages, independent of popular Linux desktop environments such as GNOME and KDE. It requires the GTK2 library to implement functionality.
Its features include the following:
Syntax highlighting is supported
Code folding
Call prompt
The symbol name is filled in automatically
Symbol list
Code navigation
A simple project management tool
A built-in system that compiles and runs user code
Can be extended through plug-ins
1. Install the compiler
The command is as follows:
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install-V gcc2, install editor
The command is as follows:
Linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install geany3, writing code
Now run Geany and write the following short code. Save it as linuxmi.c.
# include int main () {printf ("Hello,www.linuxmi.com, C programming!\ n"); / / print the output to screen return 0;} 4, compile
Now, compile your source code. Press the compile button, and then press the build button. If there are no errors in your source code, this compilation will generate a file named linuxmi with no extension in the same folder as the .c file. See GIF animation below.
What is the compile button? Pressing this button is the same as gcc-c linuxmi.c, which produces a file called program.o. This file is called the target file.
What is the build button? Pressing this button is the same as gcc-o linuxmi linuxmi.c, which produces a final file named linuxmi. This file is called a binary executable.
What is the run button? Pressing this button is the same as executing the. / linuxmi of the binary executable.
From: https://www.linuxmi.com/geany-ubuntu-20-04-c-c.html
5. Run
Now press the run button. This will open a terminal and display your code output. The output should be:
Hello,www.linuxmi.com, C programming!
Thank you for your reading, the above is the content of "how to configure C or C++ lightweight graphic development environment under Ubuntu 20.04". After the study of this article, I believe you have a deeper understanding of how to configure C or C++ lightweight graphic development environment under Ubuntu 20.04. the specific use also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.