[Rcpp-devel] Need Help: debugging Rcpp with gdb on Windows 8
jbuonagurio at exponent.com
Wed Sep 24 01:02:21 CEST 2014
> -----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: Tuesday, September 23, 2014 3:39 PM
> To: Kumar Aiyer
> Cc: rcpp-devel at lists.r-forge.r-project.org
> Subject: Re: [Rcpp-devel] Need Help: debugging Rcpp with gdb on Windows 8
> On 23 September 2014 at 12:14, Kumar Aiyer wrote:
> | Hi John:
> | Thanks for the info. I have not checked if it works in vanilla MingW.
> | Doing that today. However here is the summary from the user guide
> | which clearly states it has been tested. The problem may be with the 64bit
Confirmed, seems to be a problem linking to the 64-bit DLLs. It works when building with g++ -m32 and running in 32-bit R. As Dirk suggests, just don't expect trouble-free operation between Rcpp and MSVC code. Since the API is simple enough, I'd personally use the old-fashioned R SEXP API in this case.
g++ -m32 -I"C:/R/R-3.1.1/include" -I"C:/R/R-3.1.1/library/Rcpp/include" -I"C:/SAM/ssc-sdk-2014-1-21" -c RcppSSC.cpp -o RcppSSC.o
g++ -m32 -shared -s -static-libgcc -L"C:/R/R-3.1.1/bin/i386" -L"C:/SAM/ssc-sdk-2014-1-21/win32" -o RcppSSC.dll RcppSSC.o -lssc -lR
> ssc.module <- Module("RcppSSC", PACKAGE="RcppSSC")
> ssc <- ssc.module$RcppSSC
> s <- new(ssc, "pvwattsv1")
Log Notice: precheck input: variable 'file_name' required but not assigned time -1
> In the context of the SSC library, maybe.
> Note that the example below uses C language code (and there is a reason)
> But what you are overlooking is that in general you CANNOT mix code from
> Visual Studio and MinGW for purposes of Rcpp -- and in general you CANNOT
> C++ code from different compilers. So unless you get the source code
> C++ for SSC
> and learn how to build an Rcpp package __from sources__ ie without an
> external library you will be out of luck.
> This is all stated in the Rcpp-FAQ.
More information about the Rcpp-devel