title: error in dyn.load in Rcpp package in mac
body: <p>I have a problem in loading compiled object Rcpp compiled object.  I am compiling RcppSMC package from source. I</p>
  
  <pre><code>Error in dyn.load("mylib.so") : 
    unable to load shared object '/Users/avi/softwares/RcppSMC/src/mylib.so': 
    dlopen(/Users/avi/softwares/RcppSMC/src/mylib.so, 6): Symbol not found: __ZNSoD0Ev
    Referenced from: /Users/avi/softwares/RcppSMC/src/mylib.so
    Expected in: flat namespace
   in /Users/avi/softwares/RcppSMC/src/mylib.so 
  </code></pre>
  
  <p>I am using clang for compiling with following verson. I think there is some compiling problem because if I download the mac os binary from CRAN dyn.load works. </p>
  
  <pre><code>Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  Target: x86_64-apple-darwin13.0.0 
  
  clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include -I/usr/local/include -I"/Users/avi/Library/R/3.0/library/Rcpp/include"   -fPIC  -g -O3 -pipe -std=c++0x -Wall -pedantic -c blockpfgaussianopt.cpp -o blockpfgaussianopt.o
    .....
  clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o mylib.so blockpfgaussianopt.o history.o pflineart.o pfnonlinbs.o smc-exception.o /Users/avi/Library/R/3.0/library/Rcpp/lib/libRcpp.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
  </code></pre>
  
  <p>installing to /Users/avi/Library/R/3.0/library/RcppSMC/libs</p>
  
  <p>This is weird problem because sourceCpp is working in the machine.</p>