0

I experience a little problem for compiling the R example QtDensity under Windows 7.

I use Qt 5.6 because it's compiled with MinGW 4.9, the same toolchain as RTools 34.

Here are the building errors:

C:\Qt\Qt5.6.2\Tools\mingw492_32\i686-w64-mingw32\include\objidlbase.h:864: erreur : macro "Realloc" requires 3 arguments, but only 2 given
         SIZE_T cb) = 0;
                  ^
C:\Qt\Qt5.6.2\Tools\mingw492_32\i686-w64-mingw32\include\objidlbase.h:864: erreur : 'Realloc' declared as a 'virtual' field
         SIZE_T cb) = 0;
                      ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : expected identifier before '(' token
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                     ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : 'parameter' declared as function returning a function
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                               ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : expected ')' before ',' token
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                                  ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : expected identifier before '(' token
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                     ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : 'parameter' declared as function returning a function
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                               ^

C:\Progz\R-3.3.2\include\R_ext\RS.h:73: erreur : expected ')' before ',' token
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
                                                  ^

It works fine and with no adjustments at all under (Arch)Linux.

I had a look here, but the line evoked in the first answer has the good shape.

Community
  • 1
  • 1
  • 1
    You need to be careful with the include order of the header files. R includes some things, and (re-)defines macros that upset other things. See _Writing R Extensions_. And this question is still a duplicate of your previous one. – Dirk Eddelbuettel Feb 27 '17 at 12:43
  • Thanks for your answer. I was thinking it was pertinent to make a thread for what I asked as a comment. – Patrick Augeau Feb 27 '17 at 12:54

0 Answers0