[Rcpp-devel] [R] Plot and curve inside C++
Dirk Eddelbuettel
edd at debian.org
Sun Mar 6 20:10:45 CET 2011
On 6 March 2011 at 18:55, Paul Smith wrote:
| On Sun, Mar 6, 2011 at 6:41 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
| > | > | > | However, I would like to plot graphs from inside a C++ project.
| > | > | > | Thus, I would like to know what include paths and libs should I add to
| > | > | > | my C++ project. I am using QtCreator as an IDE on Fedora 14.
| > | > | >
| > | > | > You need to read the Makefile that supports these example and understand what
| > | > | > it does. You then need adapt your .pro file for Qt accordingly as it will
| > | > | > create your Makefile. QtCreator is just a shell / ide and I fear you still
| > | > | > need to work out how to do this. If you want something truly portable you
| > | > | > have to do what the makefile does and compute locations for R, Rcpp and
| > | > | > RInside on the fly. If you don't need portability you can hardcode the
| > | > | > paths. If you're completely lost try reducing things to a simple example of
| > | > | > one main() function with one widget displaying the png we created. I can try
| > | > | > to help you from there as I had a bit of Qt / qmake experience.
| > | > | >
| > | > | > Also, the vignette Rcpp-package explains how to use Rcpp in your own packages
| > | > | > and may be of help too.
| > | > |
| > | > | Thanks again, Dirk. I will wait a bit, as perhaps there is someone on
| > | > | this list that has already a working .pro file.
| > | >
| > | > That's one approach.
| > | >
| > | > Another would be to write and contribute it as a first example for a new
| > | > section examples/qt/ within the RInside sources. Eternal fame awaits...
| > |
| > | The point, Dirk, is that I have done nothing with Qt; I just use
| > | QtCreator as an IDE; all my programs are console ones!
| >
| > Ah, very good, I misread that.
| >
| > In which you can forget the bits about qmake and just copy what
| > examples/standard/Makefile already has as a working example. What exactly do
| > you think you are still missing?
|
| Thanks, Dirk. Actually, I do not know how to convert a makefile file
| in a .pro file. I hope some kind soul can post here a .pro file that
| works with the RInside examples.
http://stackoverflow.com/questions/2987062/configuring-gcc-compiler-switches-in-qt-qtcreator-qmake/3042278#3042278
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list