mcp_vs2005 源码路径:https://guliverkli2.svn.sourceforge.net/svnroot/guliverkli2
用vs2008打开mpc_vs2005.sln
编译报错:
1>.\UDPReader.cpp(323) : error C2065: 'ip_mreq' : undeclared identifier
\src\apps\mplayerc\stdafx.h(62) : fatal error C1083: Cannot open include file: 'streams.h': No such file or directory
解决办法:
1、UDPReader.cpp(323) : error C2065: 'ip_mreq' : undeclared identifier报错问题:
tools=>options =>vc++ directoroys=>include files 添加:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
UDPReader.cpp文件inclu头文件代码处 添加:#include "ws2ipdef.h"
2、 fatal error C1083: Cannot open include file: 'streams.h': No such file or directory问题
没有使用direct show 导致,下载dirctshow三方库,本人dirctshow库名字为DXSDK,放在E盘根目录下,
tools=>options =>vc++ directoroys=>include files 添加:
E:\DXSDK\Include
E:\\DXSDK\Samples\C++\DirectShow\BaseClasses
tools=>options =>vc++ directoroys=>library files 添加:
E:\DXSDK\Lib
E:\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug
E:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release
解决以上问题,继续编译,报错:
3>.\WebServer.cpp(7) : fatal error C1083: Cannot open include file: 'atlisapi.h': No such file or directory
(最开始本人报错:Cannot open include file: 'atlrx.h': No such file or directory)
解决方法:
从Codeplex下载最新版的 ATL Server Library
本人下载路径:http://atlserver.codeplex.com/releases/view/3754
将下载下来的ATL_Server_Source_and_Headers_9_0_70425_Alpha.zip解压并在Visual Studio 2008 的Tools | Options | Projects and Solutions | VC++ Directories). include files把这个文件夹目录下的include目录添加进去
本人路径:E:\ThirdParty\ATL_Server_Source_and_Headers_9_0_70425_Alpha\include
继续编译,vs2008 的output提示:
========== Build: 0 succeeded, 0 failed, 56 up-to-date, 1 skipped ==========
点击vs2008 的debug|start without debug 就出现下面令人激动的MPC播放器界面了,好了!可以用他打开你想欣赏的媒体文件了 !!