- Use gcc
gcc main.c function.c -o out_exe
.\out_exe
if the characters do not display correctly, check the encoding method of CMD
if encoding code is 936 (means GBK), then set the encoding code as 65001
chcp // use chcp to check the current encoding method
chcp 65001 // set the encoding method as 65001 (UTF-8)