C Fundamentals

1. Installation

  • For local development, I’m using WSL2 Ubuntu LTS 20.04, so I need to install build-essential
sudo apt install build-essential
  • Also I want to use gdb to debug
sudo apt install gdb
  • Finally I will upload my local directory to the cloud (Using Tencent Cloud)
scp -r ~/my_dir isaac@tx:~/my_dir

2. Compile and Run

  • To Compile the source code with my desired .out filename
gcc my_program.c -o my_program.out
  • To Compile the file that can be debugged by GDB
gcc -g my_prog.c -o my_prog.out

To debug with GDB

gdb my_prog.out

See below using WSL2 Ubuntu LTS 20.04 + Vim + Tmux

   Reprint policy

《C Fundamentals》 by Isaac Zhou is licensed under a Creative Commons Attribution 4.0 International License