Win32中的GUID图书馆在哪里
我正在尝试“如何如何使用Media Foundation播放媒体文件“ ,我试图用以下makefile编译代码:
LDFLAGS = -LC:\\pathToWindowsSDK\\Lib\\10.0.22000.0\\um\\x64 -lMfplat -lMfuuid -lUser32 -lOle32 -lShlwapi -lMf
default: winmain.o player.o
g++ winmain.o player.o -o a.exe
winmain.o: winmain.cpp player.h
g++ winmain.cpp -c
player.o: player.cpp player.h
g++ player.cpp $(LDFLAGS) -c
而且我不断获得以下未定义的引用:
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: player.o:player.cpp:(.rdata$.refptr.GUID_NULL[.refptr.GUID_NULL]+0x0): undefined reference to `GUID_NULL'
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: player.o:player.cpp:(.rdata$.refptr.MR_VIDEO_RENDER_SERVICE[.refptr.MR_VIDEO_RENDER_SERVICE]+0x0): undefined reference to `MR_VIDEO_RENDER_SERVICE'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:4: default] Error 1
这两个都是不确定的GUID错误,我应该链接一个库吗? 我正在使用MSYS G ++编译器和Windows 11 SDK(10.0.22000)。提前致谢!
I was trying the example code on "How to Play Media Files with Media Foundation", and I tried to compile the code with the following makefile:
LDFLAGS = -LC:\\pathToWindowsSDK\\Lib\\10.0.22000.0\\um\\x64 -lMfplat -lMfuuid -lUser32 -lOle32 -lShlwapi -lMf
default: winmain.o player.o
g++ winmain.o player.o -o a.exe
winmain.o: winmain.cpp player.h
g++ winmain.cpp -c
player.o: player.cpp player.h
g++ player.cpp $(LDFLAGS) -c
and I keep getting the following undefined references:
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: player.o:player.cpp:(.rdata$.refptr.GUID_NULL[.refptr.GUID_NULL]+0x0): undefined reference to `GUID_NULL'
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: player.o:player.cpp:(.rdata$.refptr.MR_VIDEO_RENDER_SERVICE[.refptr.MR_VIDEO_RENDER_SERVICE]+0x0): undefined reference to `MR_VIDEO_RENDER_SERVICE'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:4: default] Error 1
Both are undefined errors of GUID, is there a library that I should link?
I'm using MSYS g++ compiler, and Windows 11 SDK (10.0.22000). Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试添加-luuid(默认情况下,通过Visual Studio链接到UUID.lib创建的Visual C ++项目)。
Try adding -luuid (Visual C++ projects created through Visual Studio link to uuid.lib by default).