<div dir="ltr"><div>Dirk,<br><br></div><div>   In a simpler project, I noticed the following: <br><br>1) When I use the static library RInside/lib/libRInside.a I get the link error above, i,e. <br>missing Rcpp::Language::update().However, if I replace RInside.a by the RInside.so <br>
the link problem disappears. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">2) There isn't a method called update in the version of the class Language in<br></div><div class="gmail_extra">/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Language.h<br>
<br></div><div class="gmail_extra"> These observations lead to the natural questions:<br><br></div><div class="gmail_extra">1) are you sure the distributed LibRInside.a was compiled with the latest<br>version of the class Language?<br>
<br></div><div class="gmail_extra">2) When you say that everything works fine there, did you consider linking<br></div><div class="gmail_extra">against each one of the THREE version of libRInside:  /lib/libRInside.a,  /lib/libRInside.so and<br>
</div><div class="gmail_extra">/libs/libRInside.o?<br><br></div><div class="gmail_extra">              walter.<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 29, 2013 at 10:37 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im"><br>
On 29 March 2013 at 22:13, Walter Mascarenhas wrote:<br>
| Dirk,<br>
|<br>
|   SInce I wrote you this afternoon, I upgraded to R 2.15.3 and got version<br>
| 0.10.3 of rcpp and<br>
| 0.2.10 of Rinside. I am using ubuntu 12.04 LTS, with g++4.7.2 and Qt 5.0.1 in<br>
| Qt creator 2.6.2<br>
| (the first few lines of the makefile generated by qmake are at the end of this<br>
| message)<br>
<br>
</div>It is probably Qt 5 that makes the difference.<br>
<br>
Why did you pick it?  Ubuntu 12.04 and 12.10 comes with perfectly fine<br>
versions of Qt 4.7.*<br>
<div class="im"><br>
|   Now rinsides's qtdensity example does not work anymore, for two reasons:<br>
| 1) The file main.cpp does not compile. It is easy to fix this by addng<br>
| these four lines to main.cpp:<br>
|<br>
| #include <QLineEdit><br>
| #include <QGroupBox><br>
| #include <QRadioButton><br>
| #include <QButtonGroup><br>
|<br>
| I guess these files are included via <qtGui> in your machine.<br>
<br>
</div>Yes, works here out of the box.<br>
<div class="im"><br>
| 2) There is a link problem:<br>
|<br>
| /usr/local/lib/R/site-library/RInside/lib/libRInside.so:-1: error: undefined<br>
| reference to `Rcpp::Language::update()'<br>
<br>
</div>Dito. That one is weirder.<br>
<br>
If we both use Rcpp 0.10.3, why do you have this and I don't?<br>
<br>
Do the other examples (in the neighbouring directories) build?<br>
<div class="im"><br>
| which I do not now how to solve. What should I do?<br>
<br>
</div>Debug it. It broke, and you get to keep the pieces.<br>
<br>
I support software I give away for free. I test to the best of my ability and<br>
resources, but keep in mind that I do not have the manpower or resource to<br>
test on every conceivable combination of related software releases.<br>
<br>
I really do think that you safest bet may to take the libqt* versions from<br>
your distro.<br>
<div><div class="h5"><br>
| Once you tell me how to fix this I will build an example with qt in which I<br>
| use Rcpp to reproduce the results in a finance paper which were obtained<br>
| originally in matlab. I believe it will be a neat example of the use of Rcpp<br>
| (and I want to look very carefully at this article anyway)<br>
|<br>
| Here are the first lines of the makefile:<br>
|<br>
| ##############################<br>
| ###############################################<br>
| # Makefile for building: qtdensity<br>
| # Generated by qmake (3.0) (Qt 5.0.1) on: Fri Mar 29 21:33:20 2013<br>
| # Project:  /usr/local/lib/R/site-library/RInside/examples/qt/<a href="http://qtdensity.pro" target="_blank">qtdensity.pro</a><br>
| # Template: app<br>
| # Command: /home/walter/qt.5.0.1/5.0.1/gcc_64/bin/qmake -spec linux-g++-64<br>
| CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug QMAKE_CXX=g++-4.7<br>
| QMAKE_CXXFLAGS+=-std=c++11 -o Makefile /usr/local/lib/R/site-library/RInside/<br>
| examples/qt/<a href="http://qtdensity.pro" target="_blank">qtdensity.pro</a><br>
| #############################################################################<br>
|<br>
| MAKEFILE      = Makefile<br>
|<br>
| ####### Compiler, tools and options<br>
|<br>
| CC            = gcc<br>
| CXX           = g++-4.7<br>
| DEFINES       = -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_SVG_LIB<br>
| -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB<br>
| CFLAGS        = -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE $(DEFINES)<br>
| CXXFLAGS      = -m64 -pipe -std=c++11 -I/usr/share/R/include -I/usr/local/<br>
| lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RInside/include<br>
| -g -Wall -W -D_REENTRANT -fPIE $(DEFINES)<br>
| INCPATH       = -I../../../../qt.5.0.1/5.0.1/gcc_64/mkspecs/linux-g++-64<br>
| -I/usr/local/lib/R/site-library/RInside/examples/qt -I../../../../qt.5.0.1/<br>
| 5.0.1/gcc_64/include -I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtSvg -I../..<br>
| /../../qt.5.0.1/5.0.1/gcc_64/include/QtWidgets -I../../../../qt.5.0.1/5.0.1/<br>
| gcc_64/include/QtGui -I../../../../qt.5.0.1/5.0.1/gcc_64/include/QtCore -I. -I.<br>
| LINK          = g++<br>
| LFLAGS        = -m64 -Wl,-rpath,/home/walter/qt.5.0.1/5.0.1/gcc_64<br>
| -Wl,-rpath,/home/walter/qt.5.0.1/5.0.1/gcc_64/lib<br>
| LIBS          = $(SUBLIBS) -L/usr/X11R6/lib64 -L/usr/lib/R/lib -lR<br>
| -lblas -llapack -L/usr/local/lib/R/site-library/RInside/lib -lRInside<br>
| -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib -L/usr/local/lib/R/<br>
| site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib<br>
| -L/home/walter/qt.5.0.1/5.0.1/gcc_64/lib -lQt5Svg -lQt5Widgets -lQt5Gui<br>
| -lQt5Core -lGL -lpthread<br>
| AR            = ar cqs<br>
| RANLIB        =<br>
| QMAKE         = /home/walter/qt.5.0.1/5.0.1/gcc_64/bin/qmake<br>
| TAR           = tar -cf<br>
| COMPRESS      = gzip -9f<br>
| COPY          = cp -f<br>
| SED           = sed<br>
| COPY_FILE     = cp -f<br>
| COPY_DIR      = cp -f -R<br>
| STRIP         = strip<br>
| INSTALL_FILE  = install -m 644 -p<br>
| INSTALL_DIR   = $(COPY_DIR)<br>
| INSTALL_PROGRAM = install -m 755 -p<br>
| DEL_FILE      = rm -f<br>
| SYMLINK       = ln -f -s<br>
| DEL_DIR       = rmdir<br>
| MOVE          = mv -f<br>
| CHK_DIR_EXISTS= test -d<br>
| MKDIR         = mkdir -p<br>
</div></div>| [cleardot]<br>
<br>
It's all reasonable, and the only clear difference I see it qt5.0. My releases<br>
assume qt4.* and currently test under 4.7.<br>
<span class=""><font color="#888888"><br>
Dirk<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</font></span></blockquote></div><br></div></div>