错误 14 error LNK2005: public: static unsigned int const zxing::DecodeHints::CHARACTER_SET (?CHARACTER
来源:互联网 发布:网络教育院校 编辑:程序博客网 时间:2024/05/17 22:40
在编译zxing cpp的时候报错:
错误 14 error LNK2005: public: static unsigned int const zxing::DecodeHints::CHARACTER_SET (?CHARACTER_SET@DecodeHints@zxing@@2IB) 已经在 AztecReader.obj 中定义 DecodeHints.obj
解决方法如下:
1、将decodeHints.cpp中的const DecodeHintType DecodeHints::CHARACTER_SET;改为const DecodeHintType DecodeHints::CHARACTER_SET = 1 << 30;
2、将decodeHints.h中的static const DecodeHintType CHARACTER_SET = 1 << 30;改为 static const DecodeHintType CHARACTER_SET;
错误14 error LNK2005: "private: static int const zxing::pdf417::detector::LinesSampler::BARCODE_START_OFFSET" (?BARCODE_START_OFFSET@LinesSampler@detector@pdf417@zxing@@0HB) 已经在 LinesSampler.obj 我还报了几个错误除了BARCODE_START_OFFSET还有MODULES_IN_SYMBOL、BBARS_IN_SYMBOL、POSSIBLE_SYMBOLS,所以我修改如下(你可以根据自己的错误自行修改):
1、将LinesSampler.cpp中的const int LinesSampler::MODULES_IN_SYMBOL;改为const int LinesSampler::MODULES_IN_SYMBOL = 17;
const int LinesSampler::BARS_IN_SYMBOL;改为const int LinesSampler::BARS_IN_SYMBOL = 8;
const int LinesSampler::POSSIBLE_SYMBOLS;改为const int LinesSampler::POSSIBLE_SYMBOLS = 2787;
const int LinesSampler::BARCODE_START_OFFSET;改为const int LinesSampler::BARCODE_START_OFFSET = 2;
2、将LinesSampler.h中的static const int BARS_IN_SYMBOL = 8;static const int MODULES_IN_SYMBOL = 17;改为static const int MODULES_IN_SYMBOL;
将static const int BARS_IN_SYMBOL = 8;改为static const int BARS_IN_SYMBOL;
将static const int POSSIBLE_SYMBOLS = 2787;改为static const int POSSIBLE_SYMBOLS;
将static const int BARCODE_START_OFFSET = 2;改为static const int BARCODE_START_OFFSET;
解决上面的错误之后还报:错误14 error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
报这个错误很简单处理,原因是因为没有main函数作为入口导致的,你自己新建一个cpp文件然后写一个main函数。
- 错误 14 error LNK2005: public: static unsigned int const zxing::DecodeHints::CHARACTER_SET (?CHARACTER
- error LNK2005: void * __cdecl operator new(unsigned int)......
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj)链接错误!
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(ne
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(ne
- 错误提示:error LNK2001: unresolved external symbol "public: static int person::weight" (?weight@person@@
- error LNK2001: 无法解析的外部符号 “unsigned int __cdecl upx_adler32(void const *,unsigned int,unsigned int)”
- static inline int register_chrdev(unsigned int major, const char *name, const struct file_operations
- static inline int register_chrdev(unsigned int major, const char *name, const stru
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj) 中定义
- public, public readonly, public static, public const
- nafxcwd.lib(afxmem.obj) :error LNK2005:"void * __cdecl operator new(unsigned int)"
- 最大连续子序列和
- Java中的final关键字
- MySql报Error Code: 1175. You are using safe update mode and you tried to update...
- nginx配置
- IIC和SPI的数据线区别
- 错误 14 error LNK2005: public: static unsigned int const zxing::DecodeHints::CHARACTER_SET (?CHARACTER
- 算法中的技巧
- MySQL 5.7 安装完成后,立即要调整的性能选项
- I,P,B帧和PTS,DTS的关系
- 两步安装tensorflow在windows上
- uva 12100 Printer Queue(打印队列)模拟
- 最小生成树-Prim算法
- 下雨天
- CSS常用居中方法