On 11 March 2013 at 18:06, ????????? wrote:
| 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.
This is the wrong list. We support Rcpp on the rcpp-devel list at R-Forge.
Subscribe before posting, or use something like gmane.org to post to it.
| Can any one give some tips?
|
|
| * 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
That looks correct in principle. But your link step failed. Maybe the name of
the library is not libuchardet, maybe it was not found, maybe it does not
have the 'uchardet_get_charset' symbol you used, or maybe you used it
with
the wrong argument signature.
We cannot tell as your example was not complete and hence not reproducible.
Dirk
| 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
|
| [[alternative HTML version deleted]]
|
|
| ----------------------------------------------------------------------
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com