zoukankan      html  css  js  c++  java
  • C++:FMC 错误

    1、generated debug assertion -- File: docsingl.cpp Line: 215 

    MFC程序vs2008编译通过,运行时出错,无法打开,提示f:ddxxxx的docsingl.cpp中的210行,找到以下代码:
    void CSingleDocTemplate::SetDefaultTitle(CDocument* pDocument)
    {
      CString strDocName;
      if (!GetDocString(strDocName, CDocTemplate::docName) ||
        strDocName.IsEmpty())
      {
        // use generic 'untitled'
        ENSURE(strDocName.LoadString(AFX_IDS_UNTITLED));
      }
      pDocument->SetTitle(strDocName);
    }
    
    红色行就是出错地方,原因是资源文件引起,一般是从英文或其它语言改成简体中文而造成,把语言相关改为以下几行
    
    
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
    #ifdef _WIN32
    LANGUAGE 4, 2
    #pragma code_page(936)
    #endif //_WIN32
    View Code
    MFC程序vs2008编译通过,运行时出错,无法打开,提示f:ddxxxx的docsingl.cpp中的210行,找到以下代码:
    void CSingleDocTemplate::SetDefaultTitle(CDocument* pDocument)
    {
      CString strDocName;
      if (!GetDocString(strDocName, CDocTemplate::docName) ||
        strDocName.IsEmpty())
      {
        // use generic 'untitled'
        ENSURE(strDocName.LoadString(AFX_IDS_UNTITLED));
      }
      pDocument->SetTitle(strDocName);
    }
    
    红色行就是出错地方,原因是资源文件引起,一般是从英文或其它语言改成简体中文而造成,把语言相关改为以下几行
    
    
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
    #ifdef _WIN32
    LANGUAGE 4, 2
    #pragma code_page(936)
    #endif //_WIN32
    View Code

     其他错误参考:http://wuyiwangyi.blog.163.com/blog/static/32149495201212182427495/

    2、SDL 库 无法解析的外部符号 __imp__fprintf

      VS2015 在链接器-》命令行 里加入legacy_stdio_definitions.lib 

    3、VS2015下解决:error LNK2019: 无法解析的外部符号 __iob_func

    解决方法一:http://m.blog.csdn.net/article/details?id=50528908

    解决方法二:直接在VS2015中加入:

    /*
     * 当lib为vs2010编译时,vs2015下静态链接libjpeg-turbo会链接出错:找不到__iob_func,
     * 增加__iob_func到__acrt_iob_func的转换函数解决此问题,
     * 当lib用vs2015编译时,不需要此补丁文件
     */
    #if _MSC_VER>=1900
    //#include "stdio.h" 
    //_ACRTIMP_ALT FILE* __cdecl __acrt_iob_func(unsigned); 
    #ifdef __cplusplus 
    extern "C" 
    #endif 
    FILE* __cdecl __iob_func(unsigned i) { 
        return __acrt_iob_func(i); 
    }
    #endif /* _MSC_VER>=1900 */
    View Code
  • 相关阅读:
    【转】zigbee终端无法重连的问题解决
    【转】ZigBee终端入网方式深入分析
    【转译】加入ZigBee联盟,共画物联网的未来
    zigbee 路由节点丢失后清除 该节点的残余网络信息
    【转】ZigBee是如何组网的?
    关于zigbee 网络拓扑节点数量的一点说明
    ZHA profile与ZLL profile的一个例子
    AJAX防重复提交的办法总结
    数组去重的几种方式
    order-image详解
  • 原文地址:https://www.cnblogs.com/shenchao/p/5301274.html
Copyright © 2011-2022 走看看