当前位置:网站首页>Some Error in Visual Studio solution
Some Error in Visual Studio solution
2022-08-11 05:46:00 【FussyCat】
Migrating one recentlylinuxUp and down items towindows,A bunch of them come out when compilingerror,Picked a few for the record.
目录
1、E1696无法打开源文件 unistd.h
无法打开源文件 <unistd.h>
无法打开 源 文件 “unistd.h”
【解决方案】
方案1:将<unistd.h>改为 “unistd.h”
结果:无效
方案2:视图-属性页-预处理器-预处理器定义,只保留“WIN32”,如图:
结果:无效
【方案3】Header file imports are isolated with macros
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
#endif
【结果】有效
2、E0020 未定义标识符 “getcwd”
【方案】先了解下 getcwd make description,从Microsoft官网上看,method is deprecated,改为_getcwd.
官网链接
【方案】Isolated with macro,重定义
#ifdef _WIN32
#define getcwd _getcwd
#endif
3、E0020 未定义标识符 “strcasecmp”
【方案】Isolated with macro,重定义
#ifdef _WIN32
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#endif
4、E0020 未定义标识符 “F_OK”
【方案】Direct macro definition assignment0
#define F_OK 0
5、E0135 namespace “std” 没有成员 “cerr”
【方案】24行注释掉/删除
6、E0135 namespace “std” 没有成员 “string_view”
【方案】查一下string_view的使用说明,是c++17的特性,编译依赖c++17即可.
官网链接
7、C2065 “ssize_t”: 未声明的标识符
【方案】宏隔离,重定义
#ifdef _WIN32
#define ssize_t size_t;
#endif
边栏推荐
- 吃瓜教程task05 第6章 支持向量机
- 【C语言从初阶到进阶】第二篇 初始C语言(二)
- imx6 yocto编译备忘
- (2) Docker installs Redis in practice (persistent AOF and RDB snapshots)
- (一)性能实时监控平台搭建(Grafana+Influxdb+Jmeter)
- Flask framework learning: template rendering and Get, Post requests
- 第二篇 DS5 Armv8 样例工程报错之GCC编译
- 07-JS事件:事件类型、事件对象、事件传播、事件委托
- npm install 时报 npm ERR Cannot read properties of null (reading ‘pickAlgorithm‘)
- Flask framework learning: template inheritance
猜你喜欢
随机推荐
CSDN 社区内容创作规范
win下clion打包的.exe文件在无运行环境的电脑运行显示缺失各种.dll
第13章 类的继承-1
程序员小白的自我救赎之路。
c指针学习(2)
利用rand函数随机生成uuid
EOF, feof function, ferror function in C language
总结:交叉验证
第二篇 DS5 Armv8 样例工程报错之GCC编译
标准模板题:采药
(二)性能实时监控平台搭建(Grafana+Prometheus+Jmeter)
labelme工具,对类别标注,再进行细致的分割
Minecraft
吃瓜教程task02 第3章 线性模型
二、Jmeter 核心配置文件
第10章 对象和类 -1
【网站小白】Hibernate插入数据成功,不报错,但是数据库中没有值
Chapter 5 Loops and Relational Expressions
vftpd本地可以连接,远程连接超时的解决
做款好喝的茶饮~