Hi! All.<br><br>I want to make R package with "<a href="http://code.google.com/p/uchardet/" target="_blank">http://code.google.com/p/uchardet/</a>" library.<br><br>But I encountered error. <br><br>Executable file with -lchardet works well but shared library didn't work with dyn.load() with Rcpp.<br>

<br>Can any one give some tips?  <br><br>I temporally opened github repo for reproducible codes. <br><br><a href="https://github.com/haven-jeon/Ruchardet">https://github.com/haven-jeon/Ruchardet</a><br><br><br><br>* installing *source* package ‘Ruchardet’ ..<br>
** libs<br>g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include -I/usr/include  -I"/home/gogamza/R/x86_64-pc-<div id=":18f">linux-gnu-library/2.15/Rcpp/include"   -fpic  -O2 -pipe -g  -c getCharEncoding.cpp -o getCharEncoding.o<br>

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<br>

installing to /home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs<br>** R<br>** preparing package for lazy loading<br>** help<br>*** installing help indices<br>** building package indices<br>** testing if installed package can be loaded<br>

Error in dyn.load(file, DLLpath = DLLpath, ...) : <br>  unable to load shared object '/home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs/Ruchardet.so':<br>  /home/gogamza/work/Ruchardet.Rcheck/Ruchardet/libs/Ruchardet.so: undefined symbol: uchardet_get_charset<br>

Error: loading failed<br>Execution halted<br>ERROR: loading failed<br>* removing ‘/home/gogamza/work/Ruchardet.Rcheck/Ruchardet<br><br><br><br>My sessionInfo().<br><br><pre><span>R > </span><span>sessionInfo()
</span>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<br><br>Thanks.<br><br>Heewon</pre></div>