c++使用PlaySound函数报错undefined reference to `PlaySoundA@12'如何解决?
被报错部分的代码:
#include <stdio.h>
#include <Windows.h>
#pragma comment(lib,"Winmm.lib")
int main()
{
PlaySound("BackgroundMusic.wav", NULL, SND_FILENAME | SND_ASYNC);
return 0;
}
c++使用PlaySound函数报错undefined reference to `PlaySoundA@12'如何解决?
被报错部分的代码:
#include <stdio.h>
#include <Windows.h>
#pragma comment(lib,"Winmm.lib")
int main()
{
PlaySound("BackgroundMusic.wav", NULL, SND_FILENAME | SND_ASYNC);
return 0;
}
用的啥编译器,
#pragma只有vc能识别,g++不认