zoukankan      html  css  js  c++  java
  • 编译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

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

  • 相关阅读:
    QT 捕获事件(全局拦截)
    QT语言翻译
    QT,QLabel添加超链接
    解决VS+Qt不生成moc文件问题
    c++编译错误:invalid new-expression of abstract class type
    C++ 异常处理
    MATLAB 随机生成互不重叠的多个矩形
    sequential minimal optimization,SMO for SVM, (MATLAB code)
    How to decide on the correct number of clusters?
    python 将数据随机分为训练集和测试集
  • 原文地址:https://www.cnblogs.com/s5689412/p/886376.html
Copyright © 2011-2022 走看看