[Rcpp-devel] Fwd: cannot compile qtdensity example on windows

Dirk Eddelbuettel edd at debian.org
Mon May 19 16:12:04 CEST 2014


On 19 May 2014 at 15:07, Michele Gubian wrote:
| ---------- Forwarded message ----------
| From: Michele Gubian <mm14722 at bristol.ac.uk>
| Date: 19 May 2014 14:39
| Subject: Re: [Rcpp-devel] cannot compile qtdensity example on windows
| To: Dirk Eddelbuettel <edd at debian.org>
| 
| 
| dear Dirk,
| 
| ok, I will try to compile everything from sources, R, Qt and the rest.
| However, the post
|  http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-November/004771.html
| says that it is not necessary.
| 
| Please have a look at the compilation errors I got, which I copy
| below. It might be that you recognize something, e.g. changes in new
| versions.
| I let you know about my progress.
| Many thanks
| Michele
| 
| output from mingw32-make -f Makefile follows:
| 
| mingw32-make -f Makefile.Release
| mingw32-make[1]: Entering directory
| 'C:/Users/Uasolo/faldone/work/Bristol/Qt/RInside/qt'
| g++ -c -pipe -fno-keep-inline-dllexport
| -IC:/PROGRA~1/R/R-31~1.0/include -IC:/PROGRA~1/R/R-31~1.0/include/i386
| -IC:/PROGRA~1/R/R-31~1.0/library/Rcpp/include
| -IC:/PROGRA~1/R/R-31~1.0/library/RInside/include -O2 -frtti -Wall
| -Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_SVG_LIB
| -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I.
| -I'../../../../../programmi/Qt/5.2.1/mingw48_32/include'
| -I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtSvg'
| -I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtWidgets'
| -I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui'
| -I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtCore'
| -I'release' -I'../../../../../programmi/Qt/5.2.1/mingw48_32/mkspecs/win32-g++'
| -o release/qtdensity.o qtdensity.cpp
| In file included from
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objbase.h:159:0,
|                  from
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\ole2.h:16,
|                  from
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\wtypes.h:12,
|                  from
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\winscard.h:10,
|                  from
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\windows.h:97,
|                  from
| ../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtCore/qt_windows.h:71,
|                  from
| ../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopengl.h:51,
|                  from
| ../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopenglcontext.h:62,
|                  from
| ../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/QtGui:32,
|                  from qtdensity.h:13,
|                  from qtdensity.cpp:8:
| c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objidl.h:618:52:
| error: macro "Realloc" requires 3 arguments, but only 2 given
|      virtual void *WINAPI Realloc(void *pv,SIZE_T cb) = 0;
|                                                     ^

That is a common and fairly standard problem of having R macros seep into
other headers.

You need to avoid it.  One way is to include the R headers after the Qt headers.

Dirk

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


More information about the Rcpp-devel mailing list