博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
配置ZXing遇到的问题(解决)--未完待续
阅读量:6911 次
发布时间:2019-06-27

本文共 1291 字,大约阅读时间需要 4 分钟。

hot3.png

如何在iOS中使用ZXing库

Well, at last I got it working.. For anyone who encounters this in the future..

  1. Rename the main.m file to main.mm.

    ZXing's README states why we need this

    It can happen that when trying to build your own project with ZXingWidgetController you get linker errors like "undefined reference to". If this error looks like a c++ undefined reference, then renaming main.m into main.mm (Objective-C++ source suffix) may fix the problem

  2. Rename the file (ViewController/View) which uses ZXing libray functions so that it also has .mm extension.

  3. Check architecture settings across project. Give architecture and valid architecture as armv7 armv7s in your project settings, target settings, and ZXing project (which you added to your main project) and target settings.

  4. In main project -> Build Settings scroll and find out the options, C++ Language Dialect and C++ Standard Library. Select options "Compiler Default" for both of them. (This is the step I missed, It is needed because newest XCode template has compiler default settings different to what they were in older versions).

  5. You also might have to set ZXingWidget's "Build Valid Architecture Only" flag set as NO. In my case, this field was already NO

These fixed the issue for me..

转载于:https://my.oschina.net/bufenye/blog/167278

你可能感兴趣的文章
python并发编程之IO模型
查看>>
Linux kernel parameter command line设置
查看>>
APNS远程推送证书的申请和制作——详细解析
查看>>
android 学习笔记(八)android底层学习8.1 学习makefile 走读build/core/main.mk
查看>>
字体FONT
查看>>
java开发软件的安装
查看>>
JavaWeb 之邮件发送
查看>>
Java虚拟机 - 内存模型
查看>>
mysql常用操作
查看>>
PHP FastCGI进程管理器PHP-FPM的架构
查看>>
hbase源码系列(六)HMaster启动过程
查看>>
LeetCode(5) : Longest Palindromic Substring
查看>>
mysql 配置详解
查看>>
cell自适应网络图片大小
查看>>
decode()函数的简单使用
查看>>
第三次作业
查看>>
asf与vga视频为何无法同步播放?我来给你解释!
查看>>
H5----初识canvas
查看>>
Oracle PL/SQL学习之基础篇(1)
查看>>
深度学习500问,我觉得很不错
查看>>