Mastering GCC/G++/GDB: From Compilation to Debugging

Mastering GCC/G++/GDB: From Compilation to Debugging

Introduction: GCC/G++/GDB, The Programmer’s “Magic Wand” Hello everyone, today we will discuss how to compile and debug C/C++ programs. When it comes to GCC/G++, many beginners might first think: “Isn’t this just a compiler? Don’t you just write gcc main.c and hit enter?” But when compilation errors occur, they realize their understanding is as shallow … Read more

Differences Between GCC and G++: A Comprehensive Guide

Differences Between GCC and G++: A Comprehensive Guide

GCC (GNU Compiler Collection) and G++ are both compilers developed by GNU, but they have some functional differences. Although they belong to the same toolset, the main difference lies in the programming languages they support and how they handle the compilation of source code. Here is a detailed introduction and comparison of GCC and G++. … Read more

Essential Makefile Guide: Step-by-Step Project Compilation!

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇1000 people technical exchange QQ group, note 【public number】 for faster access 1. Basic Structure of Makefile The Makefile contains a series of “rules”, with the basic structure of each rule as follows: target…: prerequisites… <tab> command Target(target): usually the name of the file … Read more

Introduction to Makefile

Introduction to Makefile

Click the blue text above to follow me~ 01 Introduction Today I took some time to study Makefile and organized the information I found for quick reference during future reviews, helping beginners like me save time. 02 Preparation First, let’s assume we have the following code files: main.cpp functions.h function1.cpp function2.cpp — functions.h —// functions.hvoid … Read more

Setting GCC Version When Installing VASP on Ubuntu

Setting GCC Version When Installing VASP on Ubuntu

Currently, supercomputing servers and individual servers are increasingly using the Ubuntu system, especially after the CentOS7 system, which is widely used, has stopped updating. When using the Windows system’s built-in subsystem for computational practice, the installation and acquisition of Ubuntu are more convenient and straightforward. Installing VASP in the initial environment of Ubuntu requires configuring … Read more

What Are GCC and G++? Understanding Their Differences

What Are GCC and G++? Understanding Their Differences

Source: C Language Chinese Network Editor: strongerHuang As of September 2020, the GCC compiler has been updated to version 10.2, and its functionality has expanded from initially only compiling C language to now supporting multiple programming languages, including C++. In addition, the current GCC compiler also supports compiling programs in Go, Objective-C, Objective-C++, Fortran, Ada, … Read more