cmake ccmake
下载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的更多相关文章
- zedboard OPENCV移植
1:系统环境搭建 要准备好交叉编译环境 见http://blog.csdn.net/xiabodan/article/details/22717175 2:下载cmake CMake是一个跨平台的安装 ...
- Caffe实战三(依赖包解析及环境配置)
前面的文章使用的软件环境是开始时通过apt-get命令所安装的,本文将通过编译源码的方式重新配置一个可迁移的软件环境.(参考:<深度学习 21天实战Caffe> 第五天 Caffe依赖包解 ...
- CMake学习笔记
C++开发者必备技能CMake 先简单介绍一下,CMake是一个跨平台的编译工具,它可以根据不用的平台,不同的编译环境,生成不同的MakeFile,从而控制编译的过程. 使用CMake的步骤: 1. ...
- CMake 使用方法(转)
CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的 ...
- MySQL CMake参数说明手册
MySQL自5.5版本以后,就开始使用CMake编译工具了,因此,你在安装源文件中找不到configure文件是正常的.很多人下到了新版的MySQL,因为找不到configure文件,不知道该怎么继续 ...
- 非常陌生的cmake
CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的 ...
- mysql CMAKE 参数说明
MySQL自5.5版本以后,就开始使用CMake编译工具了,因此,你在安装源文件中找不到configure文件是正常的.很多人下到了新版的MySQL,因为找不到configure文件,不知道该怎么继续 ...
- cmake,gtest单元测试程序
参考:http://blog.csdn.net/stdcoutzyx/article/details/8284183 PROJECT (HELLO) SET(SRC_LIST main.c) MESS ...
- CMake 教程
CMake是一个跨平台的程序构建工具,比如起自己编写Makefile方便很多. 介绍:http://baike.baidu.com/view/1126160.htm 本文件不介绍CMake的基本语法, ...
随机推荐
- Python基础——类
创建类 class people: '帮助信息:dsafdaf' #所有实例都会共享的 number=100 #构造函数,初始化的方法,当创建一个类的时候,首先会调用它 def __init__(se ...
- graph-basic
打算使用STL中的vector,通过邻接链表的方式存储图.这里贴基本定义,以及depth-first-search和breadth-first-search的实现代码. 其他图的算法实现,就贴在各自的 ...
- JAVA基础篇—String和StringBuffer
区别: (1)String类对象为不可变对象,一旦你修改了String对象的值,隐性重新创建了一个新的对象,释放原String对象,StringBuffer类对象为可修改对象,可以通过append() ...
- 水题:HDU1716-排列2
排列2 Problem Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数. Input 每组数据占一行,代 ...
- Activity树图
- luogu1939 【模板】矩阵加速(数列)
upd:现在推荐使用一个长度为 \(n\) 的一维向量.若状态矩阵 \(F\) 对下一时间的状态矩阵 \(F'\) 有影响,则 \(F'=FA\) 中的 转移矩阵 \(A\) 的赋值方法是: 若状态矩 ...
- day05_04 数据类型-数值、布尔值、字符串简介
数据运算 数据类型初识 数字 整数 int(integer) 整型 长整型 在python3里面已经不区分整型和长整型了,统一都叫整型 在32位机器上,整数的位数为32位,取值范围为-2**31-2* ...
- SDOJ 1195 Zhenhuan
描述 今日又在看甄嬛传,皇上觉得后宫们的勾心斗角太险恶了,有点不好,决定给每个妃子发丝带以让后宫之间和睦相处.皇上一共有N个后宫(标号为1~n),站成一个环形(1号与n号相邻),每个后宫想要ai个丝带 ...
- 第1章jquery选择器
一.jquery等价于$ jquery选择器继承了css选择器的风格. $("#ID")代替了document.getElementById()函数,即通过id获取元素. $(&q ...
- GloVe词分布式表示
GloVe 模型介绍 下面的内容主要来自https://blog.csdn.net/u014665013/article/details/79642083 GloVe的推导 GloVe是基于共现信息来 ...