R package with c++ code failed installation, No DLL was created -
i'm working on r package uses c++ code , includes external libraries (dlib, boost , optimization library developed in group). we're using rcpp integrate r , c++, problem package fails compile, , none of similar questions i've found out there have worked me.
the report generated r cmd check is:
* installing *source* package 'irtppexperimental' ... ** libs *** arch - i386 c:/rtools/mingw_32/bin/g++ -std=c++0x -i"c:/progra~1/r/r-33~1.1/include" -dndebug -i"c:/users/camilo/documents/r/win-library/3.3/rcpp/include" -i"d:/compiler/gcc-4.9.3/local330/include" -i../src/include -o2 -wall -mtune=core2 -c rcppexports.cpp -o rcppexports.o c:/rtools/mingw_32/bin/g++ -std=c++0x -i"c:/progra~1/r/r-33~1.1/include" -dndebug -i"c:/users/camilo/documents/r/win-library/3.3/rcpp/include" -i"d:/compiler/gcc-4.9.3/local330/include" -i../src/include -o2 -wall -mtune=core2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o c:/rtools/mingw_32/bin/g++ -std=c++0x -i"c:/progra~1/r/r-33~1.1/include" -dndebug -i"c:/users/camilo/documents/r/win-library/3.3/rcpp/include" -i"d:/compiler/gcc-4.9.3/local330/include" -i../src/include -o2 -wall -mtune=core2 -c test_multi.cpp -o test_multi.o c:/rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o irtppexperimental.dll tmp.def rcppexports.o rcpp_hello_world.o test_multi.o -lc:/progra~1/r/r-33~1.1/bin/i386 -lrlapack -lc:/progra~1/r/r-33~1.1/bin/i386 -lrblas irtppexperimental.dll -l../src/include -ld:/compiler/gcc-4.9.3/local330/lib/i386 -ld:/compiler/gcc-4.9.3/local330/lib -lc:/progra~1/r/r-33~1.1/bin/i386 -lr g++.exe: error: irtppexperimental.dll: no such file or directory no dll created error: compilation failed package 'irtppexperimental' * removing 'c:/users/camilo/documents/unal/mirt/tests/temps/irtppexperimental.rcheck/irtppexperimental'
and makevars/makevars.win files follows:
incfolder = ../src/include pkg_libs += $(lapack_libs) $(blas_libs) $(fpicflags) $(shlib) pkg_libs += -l$(incfolder) pkg_cxxflags+=-i$(incfolder) cxxflags+="-fno-stack-protector" cxx_std = cxx11
lastly, namespace file reads:
exportpattern("^[[:alpha:]]+") importfrom(rcpp,sourcecpp) usedynlib(irtppexperimental)
all c++ source files inside src folder, including external libraries. package created using rcpp.package.skeleton function, , used compileatributes function create rcppexports source files.
edit: pointed out coatless, here github link of project: https://github.com/sicsresearch/irtpp/tree/uni-multi-merging
Comments
Post a Comment