[Rcpp-devel] Help Rcpp under ubuntu with QT4

Dirk Eddelbuettel edd at debian.org
Mon Oct 11 19:33:40 CEST 2010


On 11 October 2010 at 12:22, Dirk Eddelbuettel wrote:
| Please do not send html mail.
| 
| On 11 October 2010 at 17:53, Paulo Trigueiros wrote:
| |     I need some help on compiling the examples that come eith Rcpp under
| |     ubuntu with QT4. Is it possible?<br>
| |     I always get the message "Cannot find library Rcpp".<br>
| 
| 1)  That makes no sense.  The Rcpp examples do not contain Qt so you cannot
|     "compile under Qt 4".  This is entirely independent.
| 
| 2)  The examples work. I happen to develop on Ubuntu myself.
| 
| 3)  Just change directory into the examples directory. Run make. Look at
|     the generated commands, ie the arguments to g++ et al
| 
| 4)  Learn how to write .pro files for qmake and Qt. It is well documented.
|     You can use the input from step 3) to do this.
| 
| 5)  And if you error is "Cannot find library Rcpp" then you trying to write
|     you own framwork without understanding it.  See point 4) -- you need to 
|     tell qmake that it needs to create a link instruction against libRcpp and
|     you to tell it where to find it. Plus the rpath argument [see 3) above]
|     or else you need to tell ld.so where libRcpp.so is.
| 
| 6)  One can possibly run shell commands from when qmake evaluates the .pro
|     file to generate the Makefile. I have not yqt combined Rcpp and Qt,
|     though I have written C++ programs with both frameworks. I expect no
|     troubles.
| 
| 7)  Lastly, and please do not take this the wrong way: Leanrn to write better
|     emails asking for help. We don't know what you did so we cannot help
|     more.

On second thought, it makes even less sense.  

Qt is a framework to build full apps, ie with a main() function.  That would
conflict with R which has its own main().

On the other hand maybe you meant to look at RInside as you want to embed R
in a C++ application built using Qt?  Should work, but haven't done it
myself.

Or maybe you want to build a module for R using Rcpp and some convenience
classes from Qt -- in which case your need to understand src/Makevars to
point to Qt header and libraries.

Dirk.


| 
| Hope this helps, Dirk
| 
| -- 
| Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list