Win32中的GUID图书馆在哪里

发布于 2025-01-28 06:25:55 字数 1244 浏览 4 评论 0原文

我正在尝试“如何如何使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟火散人牵绊 2025-02-04 06:25:55

尝试添加-luuid(默认情况下,通过Visual Studio链接到UUID.lib创建的Visual C ++项目)。

Try adding -luuid (Visual C++ projects created through Visual Studio link to uuid.lib by default).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文