win32中GUID的库在哪里
Where is the library for GUID in win32
我在 "How to Play Media Files with 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 错误,是否有我应该 link 的库?
我正在使用 MSYS g++ 编译器和 Windows 11 SDK (10.0.22000)。提前致谢!
尝试添加 -luuid(通过 Visual Studio link 创建的 Visual C++ 项目默认为 uuid.lib)。
我在 "How to Play Media Files with 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 错误,是否有我应该 link 的库? 我正在使用 MSYS g++ 编译器和 Windows 11 SDK (10.0.22000)。提前致谢!
尝试添加 -luuid(通过 Visual Studio link 创建的 Visual C++ 项目默认为 uuid.lib)。