下载libqrencode源码编译过程
 git clone https://github.com/fukuchi/libqrencode.git

2001  mkdir build
 2002  cd build/
 2004  cmake ..
 2009  make
 2027  sudo make installz
 
 2029  cd ~
 2030  qrencode -o test.png nihao

2037  sudo apt-get install ccmake
 2038  sudo apt-get install cmake-curses-gui

(修改build目录下的CMakeCache.txt文件如下://Enable build of shared libraries BUILD_SHARED_LIBS:BOOL=ON)
 2043  cd build/
 2045  ccmake ..
 2046  make
 2047  sudo make install

-------------------------------------------------------------------------------
wang@wang:~/libqrencode/build$ make
Scanning dependencies of target qrencode
[ 10%] Building C object CMakeFiles/qrencode.dir/qrencode.c.o
[ 20%] Building C object CMakeFiles/qrencode.dir/qrinput.c.o
[ 30%] Building C object CMakeFiles/qrencode.dir/bitstream.c.o
[ 40%] Building C object CMakeFiles/qrencode.dir/qrspec.c.o
[ 50%] Building C object CMakeFiles/qrencode.dir/rsecc.c.o
[ 60%] Building C object CMakeFiles/qrencode.dir/split.c.o
[ 70%] Building C object CMakeFiles/qrencode.dir/mask.c.o
[ 80%] Building C object CMakeFiles/qrencode.dir/mqrspec.c.o
[ 90%] Building C object CMakeFiles/qrencode.dir/mmask.c.o
Linking C static library libqrencode.a
[ 90%] Built target qrencode
Scanning dependencies of target qrenc
[100%] Building C object CMakeFiles/qrenc.dir/qrenc.c.o
Linking C executable qrencode
[100%] Built target qrenc
-------
wang@wang:~/libqrencode/build$ make
[ 10%] Building C object CMakeFiles/qrencode.dir/qrencode.c.o
[ 20%] Building C object CMakeFiles/qrencode.dir/qrinput.c.o
[ 30%] Building C object CMakeFiles/qrencode.dir/bitstream.c.o
[ 40%] Building C object CMakeFiles/qrencode.dir/qrspec.c.o
[ 50%] Building C object CMakeFiles/qrencode.dir/rsecc.c.o
[ 60%] Building C object CMakeFiles/qrencode.dir/split.c.o
[ 70%] Building C object CMakeFiles/qrencode.dir/mask.c.o
[ 80%] Building C object CMakeFiles/qrencode.dir/mqrspec.c.o
[ 90%] Building C object CMakeFiles/qrencode.dir/mmask.c.o
Linking C shared library libqrencode.so
[ 90%] Built target qrencode
Linking C executable qrencode
[100%] Built target qrenc
----------------------------------------------------------------------------

wang@wang:~/libqrencode/build$ make
[ 90%] Built target qrencode
[100%] Built target qrenc

-----------------------------------------------------------------------------
wang@wang:~/libqrencode/build$ sudo make install
[sudo] password for wang:
[ 90%] Built target qrencode
[100%] Built target qrenc
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/qrencode
-- Installing: /usr/local/share/man/man1/qrencode.1
-----------------
wang@wang:~/libqrencode/build$ sudo make install
[ 90%] Built target qrencode
[100%] Built target qrenc
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/qrencode
-- Removed runtime path from "/usr/local/bin/qrencode"
-- Up-to-date: /usr/local/share/man/man1/qrencode.1
-- Installing: /usr/local/lib/pkgconfig/libqrencode.pc
-- Installing: /usr/local/lib/libqrencode.so
-- Installing: /usr/local/include/qrencode.h
-------------------------------------------------------------------------

This compiles and installs the library and header file to the appropriate directories. By default, /usr/local/lib and /usr/local/include.

You can change the destination directory by passing some options to the configure script. Run "./configure --help" to see the list of options.

It also installs a binary "qrencode" to /usr/local/bin. If you want not to install it, give "--without-tools" option to the configure script.

库:/usr/local/lib

头文件:/usr/local/include

二进制可执行文件:/usr/local/bin

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

一,源码获取:
1.可使用本文件夹中的libqrencode-master.zip
2.也可自行下载:git clone https://github.com/fukuchi/libqrencode.git

二,编译与安装
1.解压libqrencode-master.zip会生成libqrencode-master文件
2.打开一个终端,进入libqrencode-master文件路径(cd xxxx/libqrencode-master)
3.mkdir build
4.cd build/
5.将CMakeLists.txt的CMAKE_MINIMUM_REQUIRED改为3.0.2
6.cmake ..
7.make
8.sudo make install

9.sudo apt-get install cmake-curses-gui

10.ccmake ..
   在弹出的编辑界面将  BUILD_SHARED_LIBS:BOOL=OFF改为 BUILD_SHARED_LIBS:BOOL=ON
11.make
12.sudo make install

三,直接生成二维码图片
1.在终端执行:qrencode -o test.png nihao会生成名为test.png的二维码图片
2.扫描该二维码图片,其内容为“nihao”

cmake ccmake的更多相关文章

  1. zedboard OPENCV移植

    1:系统环境搭建 要准备好交叉编译环境 见http://blog.csdn.net/xiabodan/article/details/22717175 2:下载cmake CMake是一个跨平台的安装 ...

  2. Caffe实战三(依赖包解析及环境配置)

    前面的文章使用的软件环境是开始时通过apt-get命令所安装的,本文将通过编译源码的方式重新配置一个可迁移的软件环境.(参考:<深度学习 21天实战Caffe> 第五天 Caffe依赖包解 ...

  3. CMake学习笔记

    C++开发者必备技能CMake  先简单介绍一下,CMake是一个跨平台的编译工具,它可以根据不用的平台,不同的编译环境,生成不同的MakeFile,从而控制编译的过程. 使用CMake的步骤: 1. ...

  4. CMake 使用方法(转)

    CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的 ...

  5. MySQL CMake参数说明手册

    MySQL自5.5版本以后,就开始使用CMake编译工具了,因此,你在安装源文件中找不到configure文件是正常的.很多人下到了新版的MySQL,因为找不到configure文件,不知道该怎么继续 ...

  6. 非常陌生的cmake

    CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的 ...

  7. mysql CMAKE 参数说明

    MySQL自5.5版本以后,就开始使用CMake编译工具了,因此,你在安装源文件中找不到configure文件是正常的.很多人下到了新版的MySQL,因为找不到configure文件,不知道该怎么继续 ...

  8. cmake,gtest单元测试程序

    参考:http://blog.csdn.net/stdcoutzyx/article/details/8284183 PROJECT (HELLO) SET(SRC_LIST main.c) MESS ...

  9. CMake 教程

    CMake是一个跨平台的程序构建工具,比如起自己编写Makefile方便很多. 介绍:http://baike.baidu.com/view/1126160.htm 本文件不介绍CMake的基本语法, ...

随机推荐

  1. apply 与 lambda

    Python中的lambda和apply用法  https://blog.csdn.net/anshuai_aw1/article/details/82347016

  2. leetcode-27-exercise_bit maniputation

    461. Hamming Distance 解题思路: 把两个数的每一位和1比较,如果结果不同说明这两位不同.要比较32次. int hammingDistance(int x, int y) { i ...

  3. Divisibility by 25 CodeForces - 988E

    You are given an integer nn from 11 to 10181018 without leading zeroes. In one move you can swap any ...

  4. TypeError: cannot use a string pattern on a bytes-like object

    一劳永逸解决:TypeError: cannot use a string pattern on a bytes-like object TypeError: cannot use a string ...

  5. 如何通过 Vue-Cli3 - Vuex 完成一个 TodoList

    昨天大概粗糙的了解了一下Vue的概况之后,并没有从框架.语法的细节来进一步学习.那今天通过一个简单的实例来继续完善一下Vue这方面的空白,用一些看得见的效果摸的着的代码在不断完成小目标的过程中慢慢消化 ...

  6. ogre3D学习基础10 -- 键盘控制与鼠标控制(缓冲控制)

    带缓冲的鼠标.键盘操作,这里的鼠标.按键事件会被各自的监听器捕获.其中OIS中定义的两个类MouseListener,KeyListener负责对事件的处理.我们需要使用这两个类的接口. 当一个键被按 ...

  7. 精通CSS高级Web标准解决方案(2-1 可视化格式模型之框模型)

    浮动.定位.框模型这些控制在页面上安排和显示元素的方式,形成CSS布局. 盒子模型 页面上的每个元素都被看成一个矩形框. 盒子模型有两种,分别是 IE 盒子模型和标准 W3C 盒子模型.他们对盒子模型 ...

  8. Linux免密远程登陆

    上一节讲到伪分布式部署,启动后需要输入4次密码,停止服务后也要输入4次密码.本节记录免密登陆原理和实践 假设有2台服务器(A和B)(这是配置原理) 1)A需要远程登录B服务器,那么A就要创建密钥对(私 ...

  9. mybatis学习(十二)——mybatis逆向工程

    MyBatis Generator (MBG)是一个mabatis的代码生成器,能够根据表自动生成mapper接口,mapper.xml文件,javaBean文件. 1.MBG的下载 打开https: ...

  10. 学习 JSP:第三步 JSP基础(未完)

    因为之前学过也用过JSP,这里只列出笔记,初学者请移步其他教程. JSP隐含对象 JSP支持九个自动定义的变量,江湖人称隐含对象.这九个隐含对象的简介见下表: 对象 描述 request HttpSe ...