1.在live目录找到名称win32config的文件,以文本文件的方式打开
将 !include <ntwin32.mak>
修改为 #!include <ntwin32.mak>
将 TOOLS32 = c:Program FilesDevStudioVc
修改为 TOOLS32 = C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023
敲黑板:上面路径中的"14.16.27023"要根据自己电脑的环境进行修改,否则编译会找不到路径!
将 C_COMPILER = "$(TOOLS32)incl"
修改为 C_COMPILER = "$(TOOLS32)inHostx64x64cl"
将 LINK = $(link) -out:
修改为 LINK = link ws2_32.lib /out:
将 LIBRARY_LINK = lib -out:
修改为 LIBRARY_LINK = lib /out:
将 LINK_OPTS_0 = $(linkdebug) msvcirt.lib
修改为 LINK_OPTS_0 = $(linkdebug) msvcrt.lib
2.编译
1)直接打开cmd控制台(快捷键win+r),输入下面代码
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Toolsvsdevcmd" -arch=x64
cd live
call genWindowsMakefiles
cd liveMedia
del *.obj *.lib
nmake /B -f liveMedia.mak
cd ..groupsock
del *.obj *.lib
nmake /B -f groupsock.mak
cd ..UsageEnvironment
del *.obj *.lib
nmake /B -f UsageEnvironment.mak
cd ..BasicUsageEnvironment
del *.obj *.lib
nmake /B -f BasicUsageEnvironment.mak
cd .. estProgs
del *.obj *.lib
nmake /B -f testProgs.mak
cd ..mediaServer
del *.obj *.lib
nmake /B -f mediaServer.mak
cd ..hlsProxy
del *.obj *.lib
nmake /B -f hlsProxy.mak
cd ..proxyServer
del *.obj *.lib
nmake /B -f proxyServer.mak
cd ..
pause
没有报错证明编译成功!!!