Hi! All. I want to make R package with "http://code.google.com/p/uchardet/" library.
But I encountered error. Executable file with -lchardet works well but shared library didn't work with dyn.load() with Rcpp. Can any one give some tips? I temporally opened github repo for reproducible codes. https://github.com/haven-jeon/Ruchardet * installing *source* package ‘Ruchardet’ .. ** libs g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include -I/usr/include -I"/home/gogamza/R/x86_64-pc- linux-gnu-library/2.15/Rcpp/include" -fpic -O2 -pipe -g -c getCharEncoding.cpp -o getCharEncoding.o g++ -shared -o Ruchardet.so getCharEncoding.o -L/home/gogamza/R/x86_64-pc-linux-gnu-library/2.15/Rcpp/lib -lRcpp -Wl,-rpath,/home/gogamza/R/x86_64- pc-linux-gnu-library/2.15/Rcpp/lib -L/usr/local/lib -L/usr/lib/ -lstdc++ -luchardet -L/usr/lib/R/lib -lR installing to /home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs ** R ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs/Ruchardet.so': /home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs/Ruchardet.so: undefined symbol: uchardet_get_charset Error: loading failed Execution halted ERROR: loading failed * removing ‘/home/gogamza/work/Ruchardet.Rcheck/Ruchardet My sessionInfo(). R > sessionInfo()R version 2.15.3 (2013-03-01) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C [5] LC_MONETARY=C LC_MESSAGES=C LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Rcpp_0.10.2 loaded via a namespace (and not attached): [1] tools_2.15.3 Thanks. Heewon
_______________________________________________ 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