error: 'memcpy' was not declared in this scope

本文记录了一次在进行实时传输软件安装过程中遇到的make报错问题。错误信息提示为未在作用域内声明'memcpy'。通过在源代码中引入<string.h>头文件解决了该问题,最终成功完成了软件的安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近要做些实时传输方面的东西,做过才发现这东西不好找,也不好装
那本以为能顺顺利利装好,装得时候很郁闷,make老是报我错:
make
这一步就出问题了。
sdh_pocket_reader.cpp:208: error: 'memcpy' was not declared in this scope
不知道是不是有很多人会出现这种情况导致装不了,但是我会出现同样的错误。其实解决办法很容易,到程序中加上头文件string.h就好了,就是#include<string.h>
,同样的方法就能处理。改完后在make 在make install就顺利装上了l。

35 0 F:\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdint In file included from F:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/cstdint 6 C:\Users\余伟杰\Desktop\哈希算法.cpp from C:\Users\余伟杰\Desktop\哈希算法.cpp 32 2 F:\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\bits\c++0x_warning.h [Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 18 7 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 52 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 100 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 101 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 102 5 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 105 26 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 182 30 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 182 46 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' has not been declared 192 30 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' does not name a type 192 47 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' has not been declared 202 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::reset()': 43 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope 47 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 48 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::update(const int*, size_t)': 53 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 55 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'index' was not declared in this scope 55 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 60 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'partLen' was not declared in this scope 62 21 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope 64 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope 69 13 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope 71 17 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'buffer' was not declared in this scope 71 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'i' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'std::string MD5::final()': 76 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' was not declared in this scope 77 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 78 17 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ';' before 'digest' 79 22 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' does not name a type 82 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'count' was not declared in this scope 82 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'bits' was not declared in this scope 85 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'index' was not declared in this scope 86 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'padLen' was not declared in this scope 87 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'PADDING' was not declared in this scope 93 16 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope 93 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'digest' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In member function 'void MD5::transform(const int*)': 106 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 107 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ';' before 'x' 109 23 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'x' was not declared in this scope 112 12 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'a' was not declared in this scope 112 15 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'b' was not declared in this scope 112 18 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'c' was not declared in this scope 112 21 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'd' was not declared in this scope 112 35 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'T' was not declared in this scope 112 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'FF' was not declared in this scope 122 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'GG' was not declared in this scope 132 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'HH' was not declared in this scope 142 40 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'II' was not declared in this scope 151 9 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'state' was not declared in this scope C:\Users\余伟杰\Desktop\哈希算法.cpp In static member function 'static void MD5::decode(const int*, int*, size_t)': 184 27 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint32_t' was not declared in this scope 184 36 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected ')' before 'input' C:\Users\余伟杰\Desktop\哈希算法.cpp In function 'int main()': 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 219 39 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] 'uint8_t' was not declared in this scope 219 47 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 228 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 228 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 228 51 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 232 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '>' before 'uint8_t' 232 43 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected '(' before 'uint8_t' 232 51 C:\Users\余伟杰\Desktop\哈希算法.cpp [Error] expected primary-expression before '>' token 修改代码
最新发布
07-07
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值