链接错误解决方法
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; };