[Rcpp-devel] problems with rInside in Ubuntu

Walter Mascarenhas walter.mascarenhas at gmail.com
Sat Mar 30 02:13:25 CET 2013


Dirk,

  SInce I wrote you this afternoon, I upgraded to R 2.15.3 and got version
0.10.3 of rcpp and
0.2.10 of Rinside. I am using ubuntu 12.04 LTS, with g++4.7.2 and Qt 5.0.1
in Qt creator 2.6.2
(the first few lines of the makefile generated by qmake are at the end of
this message)

  Now rinsides's qtdensity example does not work anymore, for two reasons:
1) The file main.cpp does not compile. It is easy to fix this by addng
these four lines to main.cpp:

#include <QLineEdit>
#include <QGroupBox>
#include <QRadioButton>
#include <QButtonGroup>

I guess these files are included via <qtGui> in your machine.

2) There is a link problem:

/usr/local/lib/R/site-library/RInside/lib/libRInside.so:-1: error:
undefined reference to `Rcpp::Language::update()'

which I do not now how to solve. What should I do?

Once you tell me how to fix this I will build an example with qt in which I
use Rcpp to reproduce the results in a finance paper which were obtained
originally in matlab. I believe it will be a neat example of the use of Rcpp
(and I want to look very carefully at this article anyway)

Here are the first lines of the makefile:

##############################
###############################################
# Makefile for building: qtdensity
# Generated by qmake (3.0) (Qt 5.0.1) on: Fri Mar 29 21:33:20 2013
# Project:  /usr/local/lib/R/site-library/RInside/examples/qt/qtdensity.pro
# Template: app
# Command: /home/walter/qt.5.0.1/5.0.1/gcc_64/bin/qmake -spec linux-g++-64
CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug QMAKE_CXX=g++-4.7
QMAKE_CXXFLAGS+=-std=c++11 -o Makefile
/usr/local/lib/R/site-library/RInside/examples/qt/qtdensity.pro
#############################################################################

MAKEFILE      = Makefile

####### Compiler, tools and options

CC            = gcc
CXX           = g++-4.7
DEFINES       = -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_SVG_LIB
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS        = -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE $(DEFINES)
CXXFLAGS      = -m64 -pipe -std=c++11 -I/usr/share/R/include
-I/usr/local/lib/R/site-library/Rcpp/include
-I/usr/local/lib/R/site-library/RInside/include -g -Wall -W -D_REENTRANT
-fPIE $(DEFINES)
INCPATH       = -I../../../../qt.5.0.1/5.0.1/gcc_64/mkspecs/linux-g++-64
-I/usr/local/lib/R/site-library/RInside/examples/qt
-I../../../../qt.5.0.1/5.0.1/gcc_64/include
-I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtSvg
-I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtWidgets
-I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtGui
-I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtCore -I. -I.
LINK          = g++
LFLAGS        = -m64 -Wl,-rpath,/home/walter/qt.5.0.1/5.0.1/gcc_64
-Wl,-rpath,/home/walter/qt.5.0.1/5.0.1/gcc_64/lib
LIBS          = $(SUBLIBS) -L/usr/X11R6/lib64 -L/usr/lib/R/lib -lR -lblas
-llapack -L/usr/local/lib/R/site-library/RInside/lib -lRInside
-Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib
-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp
-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib
-L/home/walter/qt.5.0.1/5.0.1/gcc_64/lib -lQt5Svg -lQt5Widgets -lQt5Gui
-lQt5Core -lGL -lpthread
AR            = ar cqs
RANLIB        =
QMAKE         = /home/walter/qt.5.0.1/5.0.1/gcc_64/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = cp -f
COPY_DIR      = cp -f -R
STRIP         = strip
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130329/7deb3866/attachment.html>


More information about the Rcpp-devel mailing list