在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并 ...
随机推荐
- 微软阵营稳定的好消息:.NET开源、Visual Studio
自由
今天各个IT社区,头版头条说的是微软.NET开源了.宇宙中最好的IED–Visual Studio Community 2013将免费提供给用户的消息. <宇宙中最强大的开发环境免费了! > ...
- JSP TAG
Jsp tag 能够灵活的将公共JSP代码模块化,类似<jsp:include page="./include.jsp"></jsp:include>等等. ...
- CodeForces 525C Ilya and Sticks 贪心
题目:click here #include <iostream> #include <cstdio> #include <cstring> #include &l ...
- Android学习笔记:多个AsyncTask实例的并发问题
AsyncTask是Android给开发者提供的一个简单轻量级的多线程类,通过它我们可以很容易新建一个线程让在后台做一些耗时的操作(如IO操作.网络访问等),并在这个过程中更新UI.之所以说它轻量级, ...
- php前端控制器设计1
The primary role of a front controller in web-based applications is to encapsulate the typical reque ...
- SpringMVC入门二: 1规范结构, 2简单整合MyBatis
昨天拿springMVC写的helloworld结构不好, 这次先调整一下体系结构 , 然后简单整合一下MyBatis spring的配置还是以注解为主, 不过MyBatis的映射文件什么的还是拿xm ...
- Linux远程桌面工具 -- NoMachine
玩Linux系统,会经常用到远程桌面软件. 我一直用的2个是Xmanager 和 VNC. 今天看到一个新软件: NoMachine. NoMachine NX 是一个快速的终端服务器和虚拟桌面软件, ...
- 解决TCP网络传输“粘包”问题
当前在网络传输应用中,广泛采用的是TCP/IP通信协议及其标准的socket应用开发编程接口(API).TCP/IP传输层有两个并列的协议:TCP和UDP.其中TCP(transport contro ...
- Java 实现享元(Flyweight)模式
/** * 字母 * @author stone * */ public class Letter { private String name; public Letter(String name) ...
- surfaceView画图
1.视图 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:too ...