zoukankan      html  css  js  c++  java
  • C/C++ Bug记录

    链接错误解决方法

    1. 检查库是否链接正确

    2. 库的顺序是否合理(如果库之间有依赖关系的话)

    3. 检查obj文件是否存在既有C编译的,也有C++编译的,如果存在,用extern "C"去声明函数(Visual Studio的cl编译器默认.c文件用C编译,.cpp文件用C++编译)

    4. 是否未定义。搜索出现定义的文件,编译该文件 

    编译错误解决方法

    1. can‘t open "xxx.h"

    解决办法:编译的时候加入include选项,-I某目录

    2.

    #include <vector>失败,报上述错误....

    在#include <vector>之前添加以下代码

    #include <wchar.h>
    #define _CWCHAR_
    namespace std {
        using ::mbstate_t; using ::size_t; using ::wint_t;
        using ::fwide; using ::mbrlen; using ::mbrtowc; 
        using ::mbsinit; using ::wcrtomb; using ::wcsrtombs; 
        using ::wcstol; using ::wcscat; using ::mbsrtowcs;
        using ::wcschr; using ::wcscmp; using ::wcscoll;
        using ::wcscpy; using ::wcscspn; using ::wcslen;
        using ::wcsncat; using ::wcsncmp; using ::wcsncpy;
        using ::wcspbrk; using ::wcsrchr; using ::wcsspn;
        using ::wcsstr; using ::wcstok; using ::wcsxfrm;
        using ::wmemchr; using ::wmemcmp; using ::wmemcpy;
        using ::wmemmove; using ::wmemset; using ::wcsftime;
    };
    View Code
  • 相关阅读:
    pytest实现参数化(@pytest.mark.parametrize)
    pytest标记测试用例为预期失败(@pytest.mark.xfail)
    pytest标记跳过某些测试用例不执行
    pytest的conftest.py配置
    pytest之fixture使用
    模拟赛42 题解
    模拟赛41 题解
    一些可能永远用不到的性质
    补锅
    骗分杂谈
  • 原文地址:https://www.cnblogs.com/dirge/p/9464881.html
Copyright © 2011-2022 走看看