'Multiple definition running MF Media Session Playback Example using Windows SDK 10.0.22000.0
I'm new to Media Foundation, and I downloaded the code from the media session playback example, and the Windows 11 SDK. I used the following makefile to compile with MSYS2 g++:
LDFLAGS = -LC:\\Personal\\Soft\\windowsSdk\\Lib\\10.0.22000.0\\um\\x64 -lOle32 -lmfplat -lmf -lShlwapi -ldxva2 -luuid -levr -lmfuuid -lUser32
INC = -IC:\\Personal\\Soft\\windowsSdk\\Lib\\10.0.22000.0\\um\\x64
default: player.o winmain.o
g++ winmain.o player.o $(LDFLAGS) $(INC)
winmain.o: winmain.cpp player.h
g++ winmain.cpp -c
player.o: player.cpp player.h
g++ player.cpp -c
clean:
rm *.o
and I ended up with a lot of multiple definition errors along with undefined reference to 'MR_VIDEO_RENDER_SERVICE'
:
g++ winmain.o player.o -LC:\\Personal\\Soft\\windowsSdk\\Lib\\10.0.22000.0\\um\\x64 -lOle32 -lmfplat -lmf -lShlwapi -ldxva2 -luuid -levr -lmfuuid -lUser32 -IC:\\Personal\\Soft\\windowsSdk\\Lib\\10.0.22000.0\\um\\x86
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFNETSOURCE_STATISTICS_SERVICE]+0x0): multiple definition of `MFNETSOURCE_STATISTICS_SERVICE'; winmain.o:winmain.cpp:(.rdata$MFNETSOURCE_STATISTICS_SERVICE[MFNETSOURCE_STATISTICS_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFNETSOURCE_STATISTICS]+0x0): multiple definition of `MFNETSOURCE_STATISTICS'; winmain.o:winmain.cpp:(.rdata$MFNETSOURCE_STATISTICS[MFNETSOURCE_STATISTICS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_CONTAINERTYPE]+0x0): multiple definition of `MF_TRANSCODE_CONTAINERTYPE'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_CONTAINERTYPE[MF_TRANSCODE_CONTAINERTYPE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_ASF]+0x0): multiple definition of `MFTranscodeContainerType_ASF'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_ASF[MFTranscodeContainerType_ASF]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_MPEG4]+0x0): multiple definition of `MFTranscodeContainerType_MPEG4'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_MPEG4[MFTranscodeContainerType_MPEG4]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_MP3]+0x0): multiple definition of `MFTranscodeContainerType_MP3'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_MP3[MFTranscodeContainerType_MP3]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_FLAC]+0x0): multiple definition of `MFTranscodeContainerType_FLAC'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_FLAC[MFTranscodeContainerType_FLAC]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_3GP]+0x0): multiple definition of `MFTranscodeContainerType_3GP'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_3GP[MFTranscodeContainerType_3GP]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_AC3]+0x0): multiple definition of `MFTranscodeContainerType_AC3'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_AC3[MFTranscodeContainerType_AC3]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_ADTS]+0x0): multiple definition of `MFTranscodeContainerType_ADTS'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_ADTS[MFTranscodeContainerType_ADTS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_MPEG2]+0x0): multiple definition of `MFTranscodeContainerType_MPEG2'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_MPEG2[MFTranscodeContainerType_MPEG2]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_WAVE]+0x0): multiple definition of `MFTranscodeContainerType_WAVE'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_WAVE[MFTranscodeContainerType_WAVE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_AVI]+0x0): multiple definition of `MFTranscodeContainerType_AVI'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_AVI[MFTranscodeContainerType_AVI]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MFTranscodeContainerType_AMR]+0x0): multiple definition of `MFTranscodeContainerType_AMR'; winmain.o:winmain.cpp:(.rdata$MFTranscodeContainerType_AMR[MFTranscodeContainerType_AMR]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_SKIP_METADATA_TRANSFER]+0x0): multiple definition of `MF_TRANSCODE_SKIP_METADATA_TRANSFER'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_SKIP_METADATA_TRANSFER[MF_TRANSCODE_SKIP_METADATA_TRANSFER]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_TOPOLOGYMODE]+0x0): multiple definition of `MF_TRANSCODE_TOPOLOGYMODE'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_TOPOLOGYMODE[MF_TRANSCODE_TOPOLOGYMODE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_ADJUST_PROFILE]+0x0): multiple definition of `MF_TRANSCODE_ADJUST_PROFILE'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_ADJUST_PROFILE[MF_TRANSCODE_ADJUST_PROFILE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_ENCODINGPROFILE]+0x0): multiple definition of `MF_TRANSCODE_ENCODINGPROFILE'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_ENCODINGPROFILE[MF_TRANSCODE_ENCODINGPROFILE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_QUALITYVSSPEED]+0x0): multiple definition of `MF_TRANSCODE_QUALITYVSSPEED'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_QUALITYVSSPEED[MF_TRANSCODE_QUALITYVSSPEED]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TRANSCODE_DONOT_INSERT_ENCODER]+0x0): multiple definition of `MF_TRANSCODE_DONOT_INSERT_ENCODER'; winmain.o:winmain.cpp:(.rdata$MF_TRANSCODE_DONOT_INSERT_ENCODER[MF_TRANSCODE_DONOT_INSERT_ENCODER]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME[MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE[MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_PROVIDER_DEVICE_ID]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_PROVIDER_DEVICE_ID'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_PROVIDER_DEVICE_ID[MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_PROVIDER_DEVICE_ID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_DEVSOURCE_ATTRIBUTE_SOURCE_XADDRESS]+0x0): multiple definition of `MF_DEVSOURCE_ATTRIBUTE_SOURCE_XADDRESS'; winmain.o:winmain.cpp:(.rdata$MF_DEVSOURCE_ATTRIBUTE_SOURCE_XADDRESS[MF_DEVSOURCE_ATTRIBUTE_SOURCE_XADDRESS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TOPONODE_RATELESS]+0x0): multiple definition of `MF_TOPONODE_RATELESS'; winmain.o:winmain.cpp:(.rdata$MF_TOPONODE_RATELESS[MF_TOPONODE_RATELESS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TOPONODE_DISABLE_PREROLL]+0x0): multiple definition of `MF_TOPONODE_DISABLE_PREROLL'; winmain.o:winmain.cpp:(.rdata$MF_TOPONODE_DISABLE_PREROLL[MF_TOPONODE_DISABLE_PREROLL]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_TOPONODE_PRIMARYOUTPUT]+0x0): multiple definition of `MF_TOPONODE_PRIMARYOUTPUT'; winmain.o:winmain.cpp:(.rdata$MF_TOPONODE_PRIMARYOUTPUT[MF_TOPONODE_PRIMARYOUTPUT]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_PD_DURATION]+0x0): multiple definition of `MF_PD_DURATION'; winmain.o:winmain.cpp:(.rdata$MF_PD_DURATION[MF_PD_DURATION]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_SD_LANGUAGE]+0x0): multiple definition of `MF_SD_LANGUAGE'; winmain.o:winmain.cpp:(.rdata$MF_SD_LANGUAGE[MF_SD_LANGUAGE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_SD_PROTECTED]+0x0): multiple definition of `MF_SD_PROTECTED'; winmain.o:winmain.cpp:(.rdata$MF_SD_PROTECTED[MF_SD_PROTECTED]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_SD_STREAM_NAME]+0x0): multiple definition of `MF_SD_STREAM_NAME'; winmain.o:winmain.cpp:(.rdata$MF_SD_STREAM_NAME[MF_SD_STREAM_NAME]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_SD_MUTUALLY_EXCLUSIVE]+0x0): multiple definition of `MF_SD_MUTUALLY_EXCLUSIVE'; winmain.o:winmain.cpp:(.rdata$MF_SD_MUTUALLY_EXCLUSIVE[MF_SD_MUTUALLY_EXCLUSIVE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS[MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS]+0x0): multiple definition of `MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS'; winmain.o:winmain.cpp:(.rdata$MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS[MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID]+0x0): multiple definition of `MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID'; winmain.o:winmain.cpp:(.rdata$MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID[MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID]+0x0): multiple definition of `MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID'; winmain.o:winmain.cpp:(.rdata$MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID[MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE]+0x0): multiple definition of `MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE'; winmain.o:winmain.cpp:(.rdata$MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE[MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY]+0x0): multiple definition of `MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY'; winmain.o:winmain.cpp:(.rdata$MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY[MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_METADATA_PROVIDER_SERVICE]+0x0): multiple definition of `MF_METADATA_PROVIDER_SERVICE'; winmain.o:winmain.cpp:(.rdata$MF_METADATA_PROVIDER_SERVICE[MF_METADATA_PROVIDER_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_PROPERTY_HANDLER_SERVICE]+0x0): multiple definition of `MF_PROPERTY_HANDLER_SERVICE'; winmain.o:winmain.cpp:(.rdata$MF_PROPERTY_HANDLER_SERVICE[MF_PROPERTY_HANDLER_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_RATE_CONTROL_SERVICE]+0x0): multiple definition of `MF_RATE_CONTROL_SERVICE'; winmain.o:winmain.cpp:(.rdata$MF_RATE_CONTROL_SERVICE[MF_RATE_CONTROL_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MR_POLICY_VOLUME_SERVICE]+0x0): multiple definition of `MR_POLICY_VOLUME_SERVICE'; winmain.o:winmain.cpp:(.rdata$MR_POLICY_VOLUME_SERVICE[MR_POLICY_VOLUME_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MR_CAPTURE_POLICY_VOLUME_SERVICE]+0x0): multiple definition of `MR_CAPTURE_POLICY_VOLUME_SERVICE'; winmain.o:winmain.cpp:(.rdata$MR_CAPTURE_POLICY_VOLUME_SERVICE[MR_CAPTURE_POLICY_VOLUME_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MR_STREAM_VOLUME_SERVICE]+0x0): multiple definition of `MR_STREAM_VOLUME_SERVICE'; winmain.o:winmain.cpp:(.rdata$MR_STREAM_VOLUME_SERVICE[MR_STREAM_VOLUME_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MR_AUDIO_POLICY_SERVICE]+0x0): multiple definition of `MR_AUDIO_POLICY_SERVICE'; winmain.o:winmain.cpp:(.rdata$MR_AUDIO_POLICY_SERVICE[MR_AUDIO_POLICY_SERVICE]+0x0): first defined here
C:/Personal/Soft/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Personal\Soft\windowsSdk\Lib\10.0.22000.0\um\x64/mfuuid.lib(d:/os/obj/amd64fre/avcore/published/mf/daytona/objfre/amd64/guids.obj):(.rdata[MF_SAMPLEGRABBERSINK_IGNORE_CLOCK]+0x0): multiple definition of `MF_SAMPLEGRABBERSINK_IGNORE_CLOCK'; winmain.o:winmain.cpp:(.rdata$MF_SAMPLEGRABBERSINK_IGNORE_CLOCK[MF_SAMPLEGRABBERSINK_IGNORE_CLOCK]+0x0): first defined here
Warning: corrupt .drectve at end of def file
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:5: default] Error 1
The multiple definition errors occured when I added the -lmfuuid
, but if I remove it, more undefined reference errors show up. How can I fix this? Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|