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的基本语法, ...
随机推荐
- ultraedit编辑器破解版下载
ultraedit一款功能丰富的网站建设软件,需要的朋友可以看看. 百度百科:UltraEdit 是一套功能强大的文本编辑器,可以编辑文本.十六进制.ASCII 码,完全可以取代记事本(如果电脑配置足 ...
- Linux学习-YUM 在线升级机制
这个 yum 是透过分析 RPM 的标头资料后, 根据 各软件的相关性制作出属性相依时的解决方案,然后可以自动处理软件的相依属性问题,以解决软件 安装或移除与升级的问题. 利用 yum 进行查询.安装 ...
- hierarchy viewer不能获取userbuild手机版本的UI布局
步骤很详细:http://maider.blog.sohu.com/255485243.html 其中的第7步命令需要更改为: java -jar smali-2.0.3.jar ./out -o c ...
- 03_HibernateSessionFactory源码分析
文章导读: 讲解了一个线程为什么要使用同一个connection, 我们分析了HiberatenSessionFactory的实现机制, 然后根据Hibernate的写法重构了我们的代码. 最后测试可 ...
- [POJ 1005] I Think I Need a Houseboat C++解题
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 81874 ...
- [密钥权限过大错误]ssh “permissions are too open” error
I had a problem with my mac where I couldn't save any kind of file on the disk anymore. I had to reb ...
- 【转】关于AI的目标导向型行动计划
作者:Brent Owens 目标导向型行动计划(简称GOAP)是一种能够轻松呈现给你的代理选择的AI系统,也是帮助你可以无需维持一个庞大且复杂的有限状态机而做出明智的决策的机器. 演示版本 在这一演 ...
- 【bzoj3680】吊打XXX 随机化
题目描述 gty又虐了一场比赛,被虐的蒟蒻们决定吊打gty.gty见大势不好机智的分出了n个分身,但还是被人多势众的蒟蒻抓住了.蒟蒻们将n个gty吊在n根绳子上,每根绳子穿过天台的一个洞.这n根绳子有 ...
- 安装环境 :win64
1.安装环境 :win64 1.1 下载mysql安装包地址: https://dev.mysql.com/downloads/file/?id=476233 2.安装 2.1 解压下载的ZIP压缩包 ...
- BZOJ 2733 [HNOI2012]永无乡 ——线段树 并查集
用并查集维护联通块. 用线段树的合并来合并联通块. 自己YY了一个写法. #include <map> #include <cmath> #include <queue& ...