[Rcpp-devel] Fwd: cannot compile qtdensity example on windows
edd at debian.org
Wed May 21 05:42:01 CEST 2014
Thanks for the follow-up.
On 20 May 2014 at 15:56, John Buonagurio wrote:
| Hi Michele -
| Another option is to #define STRICT_R_HEADERS to fix the macro redefinition problem for Realloc, Free and ERROR. See R_exts/RS.h in the R sources to see what this does. I'd also make sure R_NO_REMAP is defined for good measure.
We do define R_NO_REMAP right at the top, and have for years.
Maybe we need STRICT_R_HEADERS as well. To be seen. Might be easier if users
| #undef Realloc and #undef Free also works as Dirk suggested.
| I also see that you're using Qt 5.2.1 so you may need to do some additional work to get it working. It will work fine with Qt 4. Please see my post below which lists tested and working package versions. I developed a large Qt 4 + RInside application on Windows starting from the QtDensity example and makefiles, and had zero problems.
If there are updates we need to make for the Qt example, let me know. I
checked over updating to Ubuntu 14.04 and things worked as expected.
| | -----Original Message-----
| | From: rcpp-devel-bounces at lists.r-forge.r-project.org [mailto:rcpp-devel-
| | bounces at lists.r-forge.r-project.org] On Behalf Of Dirk Eddelbuettel
| | Sent: Monday, May 19, 2014 3:14 PM
| | To: Michele Gubian
| | Cc: rcpp-devel at lists.r-forge.r-project.org
| | Subject: Re: [Rcpp-devel] Fwd: cannot compile qtdensity example on windows
| | On 19 May 2014 at 19:04, Michele Gubian wrote:
| | | hi Dirk,
| | |
| | | I tried to do the following (I am not sure I understand your
| | | suggestion, since I am a newbie)
| | | - modified the order of -I options in g++. This made no difference.
| | | Probably this was not what you meant.
| | | - I moved
| | | #include <RInside.h>
| | | after all the #include <QSomething> in qtdensity.h Now the errors are
| | | even more, and different from before. A reduced output obtained by
| | | using g++ -E is reported below.
| | |
| | | Going back to the original error, g++ complains about Realloc and Free
| | | definitions. This is similar to the problem in this post:
| | | http://stackoverflow.com/questions/11588765/using-rcpp-with-windows-sp
| | | ecific-includes
| | |
| | | but I don't know how to apply it to my case.
| | i) Use the same #undef trick. Winston shows how in his own answer.
| | ii) Set the compiler flag -fpermissive if need be, eg via an environment variable.
| | 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
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel