在Ubuntu 12.04下编译qtiplot
不在windows下,再加上不想用盗版,所以需要一个origin的替代品——qtiplot。虽然我非常抵抗用这种不停点来点去的软件,用R的ggplot2画图多好啊,高效、优雅、漂亮,但是终抵不过老板一句“这个图你用origin画”。
有公司编译出了qtiplot的deb包,但是缺少一些功能,比如不能导出数据,这太坑爹了!好吧,我只有自己来编译。哪儿知道它有太多的依赖,并且头文件包含还不能紧跟时代。 解压源代码后复制build.conf.example为build.conf,然后在里面把库的链接改成系统内的目录,不要用它那个3rdparty的目录。然后就是qmake产生Makefile,接着一边make一边看出现什么错误提示,比如找不到头文件啊,这一般是因为某些依赖的包没有安装,使用Ubuntu的包内容搜索功能找到包含这个头文件的包,然后apt-get安装上。
注意:安装好包过后还是提示找不到头文件,就是文件包含位置不对,要么手动更改源代码将头文件位置改对,要么在build.conf里面添加一个包含目录。
唯一需要修改源代码的地方就是在./3rdparty/qwtplot3d/include/qwt3d_openglhelper.h中包含#include <GL/glu.h>。
对python脚本的支持实在是弄不好了,需要sip和pyqt来生成一个头文件sipAPIqti.h,这一步我没有成功。
应该是需要下面这些包依赖:
sudo apt-get install libqt4-opengl-dev libmuparser-dev libtamuanova-dev libalglib-dev libqtassistantclient-dev libqtexengine-dev python-dev
那个手册没有编译安装,为了装它得下个latex,太不值了,所以在生成makefile后直接把手册的那部分全部删掉。
最后,关于qtiplot的文件关联问题。在Ubuntu 12.04下,如果右键选取一个新的应用程序来打开该文件,必须要求该mime类型在/usr/share/applications/下有一个对应的desktop文件,同时,该desktop文件中Exec=一栏中命令后面需要带有参数%f以用来表示此程序后面可以跟文件名。同时,在/usr/share/mime/application/目录下会有一个xml文件标示该mime类型。
下面直接把我的build.conf传上来。
isEmpty( QTI_ROOT ) {
message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
}
##########################################################
## System specific configuration
##########################################################
# Global include path which is always added at the end of the INCLUDEPATH
SYS_INCLUDEPATH = /opt/local/include /usr/include/python2.7 /usr/include/muParser /usr/include/tamu_anova /usr/include/qt4/QtAssistant
# Global lib path and libs which is ls always added at the end of LIBS
SYS_LIBS = -L/opt/local/lib -lGLU
##########################################################
## zlib (http://www.zlib.net/)
##########################################################
# include path. leave it blank to use SYS_INCLUDE
ZLIB_INCLUDEPATH = $QTI_ROOT/3rdparty/zlib/
##########################################################
## muParser (http://muparser.sourceforge.net/)
##########################################################
# include path. leave it blank to use SYS_INCLUDE
MUPARSER_INCLUDEPATH = $QTI_ROOT/3rdparty/muparser/include
# link statically against a copy in 3rdparty/
#MUPARSER_LIBS = $QTI_ROOT/3rdparty/muparser/lib/libmuparser.a
# or dynamically against a system-wide installation
MUPARSER_LIBS = -lmuparser
##########################################################
## GNU Sientific Library (http://www.gnu.org/software/gsl/)
##########################################################
# include path. leave it blank to use SYS_INCLUDE
#GSL_INCLUDEPATH = $QTI_ROOT/3rdparty/gsl/include
GSL_INCLUDEPATH =
# link statically against a copy in 3rdparty/
#GSL_LIBS = $QTI_ROOT/3rdparty/gsl/lib/libgsl.a \
$QTI_ROOT/3rdparty/gsl/lib/libgslcblas.a
# or dynamically against a system-wide installation
GSL_LIBS = -lgsl -lgslcblas
##########################################################
## QWT - use local copy till upstream catches up
# http://qwt.sourceforge.net/index.html
##########################################################
# include path.
QWT_INCLUDEPATH = $QTI_ROOT/3rdparty/qwt/src
# link locally against a copy in 3rdparty/
QWT_LIBS = $QTI_ROOT/3rdparty/qwt/lib/libqwt.a
##########################################################
## QwtPlot3D - use local copy till upstream catches up
# http://qwtplot3d.sourceforge.net/
##########################################################
# include path.
QWT3D_INCLUDEPATH = $QTI_ROOT/3rdparty/qwtplot3d/include
# link locally against a copy in 3rdparty/
win32:QWT3D_LIBS = $QTI_ROOT/3rdparty/qwtplot3d/lib/qwtplot3d.dll
unix:QWT3D_LIBS = $QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
##########################################################
## libpng - optional. you don't have to set these variables
##########################################################
# include path. leave it blank to use SYS_INCLUDE
LIBPNG_INCLUDEPATH = $QTI_ROOT/3rdparty/libpng/
# link statically against a copy in 3rdparty/
#LIBPNG_LIBS = $QTI_ROOT/3rdparty/libpng/libpng.a
# or dynamically against a system-wide installation
LIBPNG_LIBS = -lpng
##########################################################
## QTeXEngine - optional. you don't have to set these variables
# http://soft.proindependent.com/qtexengine/
##########################################################
# include path.
TEX_ENGINE_INCLUDEPATH = $QTI_ROOT/3rdparty/QTeXEngine/src
# link locally against a copy in 3rdparty/
TEX_ENGINE_LIBS = $QTI_ROOT/3rdparty/QTeXEngine/libQTeXEngine.a
##########################################################
## ALGLIB (2.6) - optional. you don't have to set these variables
# http://www.alglib.net/
##########################################################
# include path.
ALGLIB_INCLUDEPATH = $QTI_ROOT/3rdparty/alglib/
# link locally against a copy in 3rdparty/
ALGLIB_LIBS = /usr/lib/libalglib.a
##########################################################
## TAMUANOVA - optional. you don't have to set these variables
# http://www.stat.tamu.edu/~aredd/tamuanova/
##########################################################
# include path.
TAMUANOVA_INCLUDEPATH = $QTI_ROOT/3rdparty/tamu_anova/
# link locally against a copy in 3rdparty/
TAMUANOVA_LIBS = /usr/lib/libtamuanova.a
##########################################################
## python - only used if python is needed
##########################################################
# the python interpreter to use
# (unix only, windows will use what ever is configured to execute .py files!)
PYTHON = python
##########################################################
## Qt tools - allows to use specific versions
##########################################################
LUPDATE = lupdate
LRELEASE = lrelease
############################################################
## Target specific configuration: configure Qtiplot itself
############################################################
contains( TARGET, qtiplot ) {
# building without muParser doesn't work yet
SCRIPTING_LANGS += muParser
#SCRIPTING_LANGS += Python
# a console displaying output of scripts; particularly useful on Windows
# where running QtiPlot from a terminal is inconvenient
DEFINES += SCRIPTING_CONSOLE
#DEFINES += QTIPLOT_DEMO
# Uncomment the following line if you want to perform a custom installation using the *.path variables defined in ./qtiplot.pro.
#CONFIG += CustomInstall
# Uncomment the following line if you want to build QtiPlot as a browser plugin (not working on Internet Explorer).
#CONFIG += BrowserPlugin
CONFIG += release
#CONFIG += debug
# Uncomment the following line if you want to link statically against Qt.
#CONFIG += StaticBuild
#win32: CONFIG += console
}
http://blog.uorz.me/2013/07/11/%E5%9C%A8Ubuntu-12.04%E4%B8%8B%E7%BC%96%E8%AF%91qtiplot.html
在Ubuntu 12.04下编译qtiplot的更多相关文章
- ubuntu 12.04下编译安装nginx-1.9.3
1,下载nginx-1.9.3.tar.gz 两种方式: (1).ubuntu 下终端中(ctrl+alt+t) 运行命令: wget http://nginx.org/download/nginx- ...
- 在Ubuntu 12.04下采用apt-get的方法安装Qt4
在Ubuntu 12.04下采用apt-get的方法安装Qt4 注:之前发表的一篇博客是采用编译源码的方式安装Qt4,这是很有用的方式,因为源码安装对于所有系统都是通用的,其次,在使用交叉编译器的时候 ...
- Angularjs学习---angularjs环境搭建,ubuntu 12.04下安装nodejs、npm和karma
1.下载angularjs 进入其官网下载:https://angularjs.org/,建议下载最新版的:https://ajax.googleapis.com/ajax/libs/angular ...
- 升级Ubuntu 12.04下的gcc到4.7
我们知道C++11标准开始支持类内初始化(in-class initializer),Qt creator编译出现error,不支持这个特性,原因在于,Ubuntu12.04默认的是使用gcc4.6, ...
- Ubuntu 16.04下编译安装Apache2.4和PHP7结合
Ubuntu 16.04下编译安装Apache2.4和PHP7结合,并安装PDOmysql扩展. 1.编译安装apache2.4.20 1 第一步: ./configure --prefix=/usr ...
- Ubuntu 12.04下GAMIT10.40安装说明
转载于:http://www.itxuexiwang.com/a/liunxjishu/2016/0225/164.html?1456481297 Ubuntu 12.04下GAMIT10.40安装步 ...
- [转]ubuntu(12.04)下, 命令 ,内核 源代码的获取
[转]ubuntu(12.04)下, 命令 ,内核 源代码的获取 http://blog.chinaunix.net/uid-18905703-id-3446099.html 1.命令:例如:要查看l ...
- Ubuntu 12.04 下安装 Eclipse
方法一:(缺点是安装时附加openjdk等大量程序并无法去除,优点是安装简单) $ sudo apt-get install eclipse 方法二:(优点是安装内容清爽,缺点是配置麻烦)1.安装JD ...
- 在Ubuntu 12.04下创建eclipse的桌面链接
在Ubuntu 12.04下创建eclipse的桌面链接 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 在Ubuntu 12.04上安装Hadoop并 ...
随机推荐
- 【SVN】is out of date
右击项目(team->update 或者 team->freash/cleanup),再操作,提交就可以了.
- c++的引用(二)
/*按地址传递*/ #include <iostream> using namespace std; void swap(int *a, int *b) { int c; c = *a; ...
- linux 工具: Top
linux TOP命令各参数详解[转载] http://www.cnblogs.com/sbaicl/articles/2752068.html
- php下正则表达式整理
一.正则表达式的历史背景 1,内容深厚的正则表达式 ^.+@.+\\..+$ 形式 字符串搜索与匹配的工具 2,应用范围 手机输入法 Windows文件搜索 linux 列出文件命令 网站用户注册,如 ...
- WinXP系统服务详细列表
windows XP 系统服务“关闭”详细列表,释放N多内存,128也够用了! 在xp系统中,有近90个服务,默认开启了 30多个服务,而事实上我们只需要其中几个就够用了.禁止所有不必要的服务可以为您 ...
- 基于visual Studio2013解决算法导论之030二叉查找树
题目 二叉查找树 解决代码及点评 // 12二叉查找树.cpp : 定义控制台应用程序的入口点. // // 3 - 10二叉搜索树查找.cpp : 定义控制台应用程序的入口点. // #in ...
- 用php 把数组中偶数,选择出来
我有这种一个小算法,把数组中的全部的偶数或技术分别选择出来.非常多人可能,会循环这个数组,而我恰恰不循环数组就能做到这一点.代码例如以下. function odd($var) { // return ...
- muduo 与 libevent2 吞吐量对照
libevent 是一款很好用的 C 语言网络库,它也採用 Reactor 模型,正好能够与 muduo 做一对照. 本文用 ping pong 測试来对照 muduo 和 libevent2 的吞吐 ...
- EXT.NET高效开发(三)——使用Chrome浏览器的开发人员工具
这篇帖子老少皆宜,不分男女,不分种族,不分职业.俗话说:“磨刀不误砍柴工”.掌握一些开发工具的使用,对自己帮助是很大的(无论是用于分析问题,还是提高生产力).本篇就讲述如何利用Chrome浏览器(这里 ...
- javascript每日一练(九)——运动一:匀速运动
一.js的运动 匀速运动 清除定时器 开启定时器 运动是否完成:a.运动完成,清除定时器:b.运动未完成继续 匀速运动停止条件:距离足够近 Math.abs(当然距离-目标距离) < 最小运动 ...