Hi everybody,
I am having problems compiling the latest release of QtiPlot with .xls import.
Starting from v0.9.8 the library ExcelFormat (http://www.codeproject.com/KB/office/ExcelFormat.aspx) is used instead of libxls.
Since I solved (more or less cleanly) I want to give a quick outline how to compile QtiPlot 0.9.8:
You need the following packages (if I remember correctly):
Code:
sudo apt-get install build-essential g++ libboost-all-dev libpng12-dev libqt4-dev libgsl0-dev python2.6-dev python-qt4-dev python-sip4-dev
Additionally QtiPlot depends on muParser. The version in the Lucid Repos is too old so you have to compile the library yourself. Get the v1.32 source from http://muparser.sourceforge.net/. If you want ODF and XLS import you need the QuaZIP library from http://quazip.sourceforge.net/ (v0.2.3) and the ExcelFormat library from http://www.codeproject.com/KB/office/ExcelFormat.aspx or better from SVN http://shell.franken.de/svn/sky/exce...k/ExcelFormat/ (only BasicExcel.hpp/.cpp and ExcelFormat.cpp/.h are needed)
Open a console, navigate to your usual compile directory and do the following:
Code:
tar xvjf /home/yourhome/Downloads/qtiplot-0.9.8.tar.bz2
cd qtiplot-0.9.8/3rdparty
tar xvzf /home/yourhome/Downloads/muparser_v132.tar.gz
cd muparser_v132
./configure
make
sudo make install
sudo ldconfig
cd ..
If you want ODF import:
Code:
tar xvzf quazip-0.2.3.tar.gz
cd quazip.0.2.3/quazip
qmake PREFIX=/usr
make
sudo make install
cd ..
You have some more work getting xls import going.
If you are running an amd64 system you should give my attached edited version of ExcelFormat library a try because I got segfaults using the original version. Just extract the contents:
Code:
tar xvzf ExcelFormat.tar.gz
If you have x86 system, put the 4 files from SVN (BasicExcel.cpp/.hpp and ExcelFormat.cpp/.h) together with the attached (very basic) Makefile in a directory (i.e. 3rdparty/ExcelFormat).
Add these 3 lines to BasicExcel.hpp after line 110 (#include <string> //MF)
Code:
#ifdef __GNUC__
#include <string.h>
#endif
amd64 and x86:
Code:
cd ExcelFormat
make
sudo make install
cd ..
Okay now we have almost everything set up. You only need a build.conf in your qtiplot-0.9.8 directory:
Code:
isEmpty( QTI_ROOT ) {
message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
}
SYS_INCLUDEPATH = /opt/local/include
SYS_LIBS = -L/opt/local/lib
# muParser lib
MUPARSER_INCLUDEPATH =
MUPARSER_LIBS = -lmuparser
# GSL lib
GSL_INCLUDEPATH =
GSL_LIBS = -lgsl -lgslcblas
# Boost lib
BOOST_INCLUDEPATH =
BOOST_LIBS = -lboost_date_time-mt -lboost_thread-mt
# QWT
QWT_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwt/src
QWT_LIBS = $$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
# QwtPlot3D
QWT3D_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwtplot3d/include
QWT3D_LIBS = $$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
# ExcelFormat - optional
# comment the next 2 lines to disable xls import
XLS_INCLUDEPATH =
XLS_LIBS = -lExcelFormat
# QuaZIP - optional
# comment the next 2 lines to disable xls import
QUAZIP_INCLUDEPATH =
QUAZIP_LIBS = -lquazip
# libpng
LIBPNG_INCLUDEPATH =
LIBPNG_LIBS = -lpng
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
# Comment the following lines to disable donations start-up message.
#DEFINES += QTIPLOT_SUPPORT
# 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
}
and you need to edit qtiplot-0.9.8/src/core/ApplicationWindow.cpp to:
Code:
line 199: #include <quazip/quazip.h>
line 200: #include <quazip/quazipfile.h>
line 4221: if (!rows && !cols){
Finally the last commands (in the qtiplot-0.9.8 directory):
Code:
qmake
make
sudo make install
For me, the install command only installs the qtiplot plugins - I just started qtiplot directly from the qtiplot subdir - but I think you could also copy the executable to /usr/bin or somethin similiar.
Bookmarks