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的基本语法, ...
随机推荐
- VNC远程登录端使用经验之一
1.vnc/xmanager都是经常用的远程登录软件.vnc有个缺点就是他的进程不会自动退出比如如果开了PID1再去开PID2...PIDn.那么前面的PIDn-1个进程就会一直运行如果不手动kill ...
- 【php】【趣味代码】对象引用的比较
<?php $a = new stdClass(); $a->name = 'flint'; $b = $a ; $b->sex = 'man'; saveObject($b); f ...
- Python爬取全站妹子图片,差点硬盘走火了!
在这严寒的冬日,为了点燃我们的热情,今天小编可是给大家带来了偷偷收藏了很久的好东西.大家要注意点哈,我第一次使用的时候,大意导致差点坏了大事哈! 1.所需库安装 2.网站分析 首先打开妹子图的官网(m ...
- LeetCode(190) Reverse Bits
题目 Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented ...
- HDU 5025 Saving Tang Monk(状态转移, 广搜)
#include<bits/stdc++.h> using namespace std; ; ; char G[maxN][maxN], snake[maxN][maxN]; ]; int ...
- bash实例-参数/函数/统计IP
1.写一个脚本getinterface.sh,脚本可以接受参数(i,I,a),完成以下任务: (1)使用以下形式:getinterface.sh [-i interface|-I IP|-a] ...
- Java学习笔记3---unable to launch
环境配置好后,在eclipse下编写HelloWorld程序: ①创建新工程 ②创建.java文件,命名为HelloWorld ③在源文件中添加main方法,代码如下: public void mai ...
- VMware Workstation 14 PRO 下安装Ubuntu 16.04 LTS教程
一.准备好安装的VMware Workstation 14 PRO 1.VMware Workstation 14 PRO下载链接:http://rj.baidu.com/soft/detail/13 ...
- Zookeeper在windows环境下安装
1.已安装JDK并配置好了环境变量 2.下载Zookeeper,在清华大学镜像下载,选择合适版本 https://mirrors.tuna.tsinghua.edu.cn/apache/zookee ...
- 如何理解logistic函数?
作者:煎挠橙链接:https://www.zhihu.com/question/36714044/answer/78680948来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明 ...