首先安装相应的支持包:
sudo apt-get install libasound2-dev
编译写好的代码
g++ -o 输出目标文件名 源代码.cpp -lasound
执行结果文件
./输出目标文件名