Skip to content

[Rcpp-devel] Rcpp-devel Digest, Vol 61, Issue 3

3 messages · Dirk Eddelbuettel, דוד ארנבורג

#
Dirk,

I've tried running your code and got the following


Generated extern "C" functions
--------------------------------------------------------


#include <Rcpp.h>

Generated R functions
-------------------------------------------------------

`.sourceCpp_22140_DLLInfo` <- dyn.load('C:/Users/DARENB~
1.INT/AppData/Local/Temp/RtmpQzZsMV/sourcecpp_1ff431785209/sourceCpp_26179.dll
')


rm(`.sourceCpp_22140_DLLInfo`)

Building shared library
--------------------------------------------------------

DIR: C:/Users/DARENB~
1.INT/AppData/Local/Temp/RtmpQzZsMV/sourcecpp_1ff431785209

C:/PROGRA~1/R/R-31~1.1/bin/x64/R CMD SHLIB -o "sourceCpp_26179.dll"
--preclean "BoostEx.cpp"
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG
-I"C:/Users/darenburg.INTRANET/Documents/R/win-library/3.1/Rcpp/include"
 -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall
 -mtune=core2 -c BoostEx.cpp -o BoostEx.o
BoostEx.cpp: In function 'SEXPREC* sourceCpp_32214_computeGCD(SEXP, SEXP)':
BoostEx.cpp:10:39: error: 'computeGCD' was not declared in this scope
BoostEx.cpp: In function 'SEXPREC* sourceCpp_32214_computeLCM(SEXP, SEXP)':
BoostEx.cpp:25:39: error: 'computeLCM' was not declared in this scope
make: *** [BoostEx.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-31~1.1/etc/x64/Makeconf" -f
"C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="sourceCpp_26179.dll" WIN=64 TCLBIN=64 OBJECTS="BoostEx.o"' had
status 2
Error in
Rcpp::sourceCpp("C:\\Users\\darenburg.INTRANET\\Desktop\\David\\R\\Rcpp\\boostEx.cpp",
 :
  Error 1 occurred building shared library.
----

It also says in the issues that computeGCD and computeLCM were declared in
this scope

Thanks,
David

On Wed, Nov 12, 2014 at 1:00 PM, <
rcpp-devel-request at lists.r-forge.r-project.org> wrote:

            

  
    
#
David,

You seem to have more basic issues so may I suggest that you start at square
one and ensure

    evalCpp("2 * 3")

returns the expected answers?  Then maybe re-read the Boost examples, add the
required Depends on BH and see if you get one of those three-liners built.

As Gabor and I told you: "it works for us" so it
is probably at your end.

Cheers, Dirk

PS Replying to the digest is not so good as it breaks the mail threads.
#
Dirk,

I've re-installed BH and now it works. I couldn't identify the problem
though (as it gave me no error while installing in the first time), but I
guess it doesn't matter anymore

Thank you for your time
David
On Fri, Nov 14, 2014 at 4:26 AM, Dirk Eddelbuettel <edd at debian.org> wrote: