Re: [Rcpp-devel] Can an Rcpp package include Fortran code?

2016-10-06 Thread John Buonagurio
and let Rcpp attributes create the .Call() statements for you. Dirk/Kevin, please feel free to add/revise! Best, John Buonagurio ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] Passing XPtr between functions

2015-06-23 Thread John Buonagurio
Hi Charles, > SEXP testXptr(SEXP A) > { > arma::Mat armaMat = Rcpp::as >(A); > Rcpp::XPtr pMat(armaMat.memptr()); > return(pMat); > } armaMat is on the stack, so the Armadillo memptr is no longer valid when you return from the testXptr function. One simple solution in your case woul

Re: [Rcpp-devel] [rinside] compiling e QT + RInside on win7 have some problems

2015-06-22 Thread John Buonagurio
stall R in a directory with no spaces. I understand that only the Rtools MinGW distribution is supported for RInside, but you need to use GCC 4.8.2 to get QT+RInside working on Windows. John > -Original Message- > From: PO SU [mailto:rdevelm...@163.com] > Sent: Saturday, June 20, 2

Re: [Rcpp-devel] [rinside] compiling e QT + RInside on win7 have some problems

2015-06-19 Thread John Buonagurio
I did this a couple years ago, so you may need to make some changes with the latest toolset, but the process was straightforward. Here are my general suggestions: - Use the Qt 4.8.6 binary distribution built with MinGW GCC 4.8.2: http://download.qt.io/archive/qt/4.8/4.8.6/qt-opensource-windows

Re: [Rcpp-devel] R.e. Using Rcpp and MATLAB MAT-File API to Read MAT Files

2015-03-25 Thread John Buonagurio
Elliot, How are you building the executable? Did you make sure to include all dependencies in the search path (run depends.exe against libmat.dll and libmx.dll)? Did you make sure to set the appropriate architecture e.g. -m64 in CFLAGS? I don't have access to the MAT-File libraries to test this

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-16 Thread John Buonagurio
Hi Henrik, You can just add #define EIGEN_NO_DEBUG to make it clear that you want to specifically disable Eigen assertions, without relying on what sets or does not set the DNDEBUG flag. It's in the Eigen documentation: http://eigen.tuxfamily.org/dox/TopicPreprocessorDirectives.html John > -

Re: [Rcpp-devel] RcppEigen: Windows binary from CRAN crashes R, but not when installing from source.

2014-10-15 Thread John Buonagurio
Hi Henrik, R CMD INSTALL defines the NDEBUG macro (as Writing R Extensions sec. 1.7 recommends), which disables eigen_assert. Otherwise your error is triggered here: eigen_assert(a_lhs.cols() == a_rhs.rows() && "invalid matrix product" && "if you wanted a coeff-wise or a dot pro

Re: [Rcpp-devel] Need Help: debugging Rcpp with gdb on Windows 8

2014-09-23 Thread John Buonagurio
> -Original Message- > From: rcpp-devel-boun...@lists.r-forge.r-project.org [mailto:rcpp-devel- > boun...@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@lists.r-forge.r-project.org > Subject: Re: [Rc

Re: [Rcpp-devel] Need Help: debugging Rcpp with gdb on Windows 8

2014-09-23 Thread John Buonagurio
Hi Kumar, > I am developing a module RcppSSC which is an R wrapper for a C library for > Solar Energy from NREL. > -LC:/SAM/ssc-sdk-2014-1-21/win64/ -lssc Looks like you're linking to an MSVC 2013 DLL which could cause problems (even if it's ANSI C). Before attempting to build out the Rcpp modu

Re: [Rcpp-devel] Having trouble installing small package.

2014-06-02 Thread John Buonagurio
Hi Ilya, > install_github(repo="IKTrading", username="IlyaKipnis") > I get a whole stream of errors too large to even copy and paste into a single > post, and I'm not quite sure what's going wrong. * installing *source* package 'IKTrading' ... ** libs *** arch - i386 g++ -m32 -shared -s -static-

Re: [Rcpp-devel] C++11 in Windows R package

2014-05-29 Thread John Buonagurio
Dirk and Matteo, This is a MinGW issue, which as far as I can tell is undocumented. When CXX_STD=CXX11 is added to Makevars.win, R ultimately translates this to "-std=c++0x" in the g++ command (via CXX1XSTD in Makeconf). For some reason, MinGW then #undefs WIN32. This doesn't happen using use "

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

2014-05-20 Thread John Buonagurio
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. #undef Realloc and #undef Free also works as Dirk sugg

Re: [Rcpp-devel] [OT] Asking for a quick OS X favour

2014-05-12 Thread John Buonagurio
.1.0/bin/x64 -LC:/redis-2.4/deps/hiredis -lR -lhiredis -lws2_32 I ran all RcppRedis unit tests and demos against Redis 2.4 and 2.6.12 servers with no issues. I can send you the static libraries now if you'd like, or would you prefer to work on getting MinGW to build the newer hiredis release?

Re: [Rcpp-devel] RCOM

2013-06-18 Thread John Buonagurio
On 18 June 2013 at 11:08, David Silkworth wrote: > In reply to initial issue by Umesh Chitre regarding roll of RCOM. > > I use RCOM to connect my R gui to Excel on Windows for development > purposes (I know this makes Dirk laugh). Trying to compile C++ using > other than gcc would not work, so

Re: [Rcpp-devel] R Initialization with RInside

2013-06-12 Thread John Buonagurio
to query it, #ifdef WIN32 and if R_HOME is NULL. Thanks again for the great software, John -Original Message- From: Dirk Eddelbuettel [mailto:e...@debian.org] Sent: Wednesday, June 12, 2013 3:40 PM To: John Buonagurio Cc: rcpp-devel@lists.r-forge.r-project.org Subject: Re: [Rcpp-dev

[Rcpp-devel] R Initialization with RInside

2013-06-12 Thread John Buonagurio
Hi all, I am trying to package a minimal R environment with an RInside application, without requiring R already be installed and without overwriting global environment variables such as R_HOME in order to run the application. I am currently developing under Windows though I will ultimately rele

Re: [Rcpp-devel] linking fail when building examples of my local copy of Rcpp gallery (windows)

2013-04-17 Thread John Buonagurio
Hi Robin, Those exact linker errors occur if you use a different version of MinGW than the Rcpp static library. Could that possibly be the case? If so make sure to install Rcpp from source. For example: install.packages("C:/CRAN/Rcpp_0.10.3.tar.gz", repos=NULL, type="source") Make sure you hav

[Rcpp-devel] Building RProtoBuf on Windows

2013-03-19 Thread John Buonagurio
Hi all, I hope this is the best list for this question. I am attempting to build RProtoBuf on Windows - has anyone made recent progress on this and could you provide any suggestions? I managed to build the DLL with protobuf-2.5.0 and GCC 4.4 (MinGW) by making only a few changes to the source, b

[Rcpp-devel] Successfully compiled qtdensity on Windows

2013-03-08 Thread John Buonagurio
Hi, I have successfully compiled the RInside qtdensity example on Windows with the following packages: - R-2.15.3-win binary distribution - Qt 4.8.4 binary distribution (qt-win-opensource-4.8.4-mingw.exe) - MinGW with gcc 4.4.0 - Rtools version 3.0.0.1927 Cygwin utilities - Rcpp_0.10.2.tar.