yang5256 2020-12-10 00:43 采纳率: 0%
浏览 107

关于PlaySound的使用疑惑

#include<iostream>
#include<windows.h>
#include<Mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;
int main()
{
    PlaySound(TEXT("C:\\Users\\11790\\Desktop\\yinyue\\beijingyinyue.wav"),NULL,SND_FILENAME | SND_ASYNC);
    cin.get();
    cin.get();

对于该代码产生了undefined reference to `__imp_PlaySoundA' 与[Error] ld returned 1 exit status的错误怎么hui'shi

  • 写回答

1条回答 默认 最新

  • IAmLinGe 2020-12-10 17:44
    关注

    看错误提示啊, ld returned 说明链接错误,检查一下链接库 

    评论

报告相同问题?