排查“***was not declared in this scope“
在调试c++调用c时,发生了“***was not declared in this scope"问题,特此记录
头文件中已经包含了相关.h文件
首先, 怀疑是发生了环形依赖问题,排查后发现被调用文件已经包含了条件编译
#ifndef ***_H_
#define ***_H_
...
#endif
其次,程序名也未和其他库中的头文件重名;
最后,发现在c程序的存在除了上述的条件编译外,还存在另一个条件编译
#ifdef COMPONENT
即只有满足该条件下才会编译该程序
解决方案: 在include头文件前增加宏定义即可
#define COMPONENT
排查“***was not declared in this scope“相关推荐
- 【C++】mingw32-make+cmake:error: ‘nullptr‘ was not declared in this scope解决方法
###问题 使用cmake成功(Configuring done Generating done)后,在cmd终端中执行 mingw32-make报错: error: 'nullptr' was no ...
- ndk error: malloc was not declared in this scope
error: 'malloc' was not declared in this scope 解决方法: NDK_TOOLCHAIN_VERSION=4.8 APP_CPPFLAGS += -frtt ...
- 'imread' was not declared in this scope
在opencv3中,会报这个异常: 'imread' was not declared in this scope 解决方法: #include <opencv2/core/core.hpp&g ...
- 'htons' was not declared in this scope 解决
'htons' was not declared in this scope ndk 如果是在ndk下,引用如下即可: /* Must include in android ndk env */ #i ...
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...
- ‘close’ was not declared in this scope
'close' was not declared in this scope 'read' was not declared in this scope 'sysconf' was not decla ...
- 文档源代码opencv 中的错误error: ‘SurfFeatureDetector’ was not declared in this scope
本篇文章朋友在青岛游玩的时候突然想到的...最近就有想写几篇关于文档源代码的文章,所以回家到之后就奋笔疾书的写出来发布了 这是文档中的源代码,:但是译编的时候会有一下错误: error ...
- was not declared in this scope
"was not declared in this scope"是一个错误信息,在编译的时候会遇到.其含义为标识符在其出现的地方是未被定义的. 出现该错误的时候,会同时把未定义的变 ...
最新文章
- mysql查询不同用户的最新一条记录
- 用C++对C++语法格式进行分析
- 注意力机制并不是关注输入的位置
- golang mutex互斥锁分析
- 给数据库表字段设置默认值
- 话术php源码,恋爱话术宝典织梦源码
- 携程去哪儿移动端产品分析报告
- 项目所需的应用程序未安装,确保已安装项目类型(.csproj)的应用程序的解决办法...
- img src请求后台值值能判断_图片src拼接后台返回ID
- linux编译器下载地址,GNU Compiler Collection(gcc编译器) v4.9.1 linux版
- java定义类和测试类时的三种方式
- laypage分页java例子_基于LayUI分页和LayUI laypage分页的使用示例
- Spotfire10.10.0 windows10安装与配置
- CodeMeter:软件加密的“木桶定律”
- 茶叶的基本知识,喝茶的好处和坏处
- c语言自动贩卖机找钱,c语言趣题之“找钱的方法数量 ”
- 霍志刚中国科学院计算机,曙光4000系列高性能计算机研究集体
- windows10LTSC下载与安装
- 办流量卡要身份证照片,办流量卡是否需要身份证正反面照片
- OTA更新利用CRC保证程序的完整性