编译GDCL的GMFBridge

环境:Visual Studio 2005+SP1,Platform SDK Update for Vista(3/22/2007),WTL 8.0 Final

建议在Visual Studio 2005中把PSDK的bin、include、lib目录的顺序都设到VC的目录之前,这样避免出现不必要的问题(我曾经忘了设置bin目录,结果因为VC自带的MIDL编译程序较老,出现了编译错误)。

error MIDL2025 : syntax error : expecting ] or , near "annotation"
This error is caused by using the Visual Studio 2005 MIDL compiler instead of the Windows SDK ...

----------------------------------------------------------------------------------------------------

在编译的时候可能会碰到以下的链接错误:
error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t:ata_t:ata_t(char const *)" (??0Data_t@_bstr_t@@QAE@PBD@Z)
根据MSDN Forums里面的这篇帖子:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=111716&SiteID=1
是comdef.h的定义出了问题。
讨论建议:“

the best workaround is to immediately DELETE comdef.h from your

C:\program files\microsoft sdks\Windows\v6.0\include

folder after installing the Vista SDK and integrating with Visual C++ 2005.


为了避免以后需要PSDK的comdef.h,我只是将它改了名。

----------------------------------------------------------------------------------------------------

另外GMFPlay编译成Unicode版本的过程中会遇到很多错误提示,把所有的char都改成TCHAR,string都改成tstring,ostringstream改成tostringstream。把下面两个宏放到player.h或者stdafx.h里面即可。

#ifdef _UNICODE
#define tstring wstring
#else
#define tstring string
#endif

#ifdef _UNICODE
#define tostringstream wostringstream
#else
#define tostringstream ostringstream
#endif

----------------------------------------------------------------------------------------------------

转载于:https://www.cnblogs.com/s5689412/archive/2007/09/08/886376.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值