Learn a few libraries to master in C

  • 2020-04-02 03:13:31
  • OfStack

One, the use of tools

1, learn to use vim/emacs, vim/emacs is the most commonly used source code editor under Linux, not only learn to use them to edit the source code, but also learn to use them to find, locate, replace, and so on. For starters, vim is recommended, and it's the text editor I'm currently using.

2. Learned the writing rules of makefile files, and used tools aclocal, autoconf and automake to generate makefile files.

3. Master the basic usage of GCC and GDB. Knowing how to use GCC is a great way to build a package, and if you can manually compile a package with GCC when it contains a lot of files, you'll have a clear picture of the dependencies between the files in the package.

4. Master the basic usage of SVN/CVS. This is Linux, the most commonly used version management system in the open source community. Try out some open source projects on sourceforge.

Linux/Unix system call and standard C library

System call application software and operating system interface, its importance naturally goes without saying, must master. The recommended study material is Mr. Steven's advanced programming for UNIX environments (APUE).

Iii. Library learning

No matter which platform you do software development on, it is very important for you to learn libraries. There are many libraries under Linux. I will mainly introduce some libraries that I often use.

1, the glib library

The glib library is the base library for GTK + and gnome and is cross-platform and available on Linux, Unix, and Windows. The glib libraries have had the same impact on Linux platform development as MFC has had on the Windows platform, and many open source projects have made extensive use of the glib libraries, including gimp, gnome, gaim, evolution, and heartbeat, the Linux cluster software. Because the glib library comes with a basic data structure implementation, you can learn the basic data structures (including linked lists, trees, queues, and hash tables) by the way as you study the glib library.

2, libxml library

Libxml is a basic library for parsing XML files on the Linux platform, and many utilities now use configuration files in XML format, so it's worth learning.

3, the readline library

Readline library is the library used by bash shell. If you want to develop command line programs, you can use readline library to reduce a lot of work. For example, the command line auto-completion in bash is already implemented in readline. The readline library is covered by many websites. Just Google readline to find a bunch of them.

4, curses library

The curses library used to be part of the vi program and was later extracted from vi as a separate library. The curses library is particularly useful for writing terminal-related programs, such as positioning the output on a particular line or column in the terminal, changing the color of the terminal font and the terminal mode. The curses library under Linux USES the GNU implementation of ncurses(new curses).

5. GTK + and KDE libraries

These two libraries are the base libraries for developing GUI applications, and most GUI programs under Linux are developed based on these two libraries, which are also necessary for their learning.

Four, network learning

Network this thing is too wide, recommended study materials Mr. Steven's UNIX network programming (UNP) and TCP/IP protocol details, further you can learn to write network programs using libnet.

The above is all the content of this article, I hope you can enjoy it.

Related articles: