<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class="">Hi there,<br class=""><br class="">I have a problem in compiling RQuantlib on OS X. (full output see below)<br class=""></blockquote><br class="">Error Message(s): <div class="">duplicate symbol __ZNK8QuantLib24BaseCorrelationLossModelINS_20GaussianLHPLossModelENS_21BilinearInterpolationEE11setupModelsEv in:<br class="">    RcppExports.o<br class="">    asian.o<br class=""><br class=""><br class=""><blockquote type="cite" class="">Do you have any ideas what I have to do?<br class=""><br class="">With Linux/Ubuntu I have no trouble compiling RQuantlib  (see appendix)<br class="">My OS X environment is listed below too. The difference between Linux and OS X seems to be  g++ vers clang++,<br class=""><br class="">Kind regards<br class=""><br class=""><br class="">Michael<br class=""></blockquote><br class=""><br class=""><br class=""><u class="">Output</u><br class=""><br class="">Mac:downloaded_packages wasi$ R CMD INSTALL RQuantLib<br class="">* installing to library ‘/Users/wasi/Library/R/3.1/library’<br class="">* installing *source* package ‘RQuantLib’ ...<br class="">** Paket ‘RQuantLib’ erfolgreich entpackt und MD5 Summen überprüft<br class="">checking for g++... g++<br class="">checking whether the C++ compiler works... yes<br class="">checking for C++ compiler default output file name... a.out<br class="">checking for suffix of executables... <br class="">checking whether we are cross compiling... no<br class="">checking for suffix of object files... o<br class="">checking whether we are using the GNU C++ compiler... yes<br class="">checking whether g++ accepts -g... yes<br class="">checking how to run the C++ preprocessor... g++ -E<br class="">checking whether we are using the GNU C++ compiler... (cached) yes<br class="">checking whether g++ accepts -g... (cached) yes<br class="">checking for R... yes<br class="">checking for quantlib-config... yes<br class="">checking for Boost development files... yes<br class="">checking for minimal Boost version... yes<br class="">configure: creating ./config.status<br class="">config.status: creating src/Makevars<br class="">Completed configuration and ready to build.<br class="">** libs<br class="">/usr/bin/clang++ -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/opt/local/include -I"/Users/wasi/Library/R/3.1/library/Rcpp/include"  -pipe -Os -arch x86_64 -stdlib=libc++  -I/gaia/local/include -I/opt/local/include  -I../inst/include -I.  -fPIC  -pipe -Os -arch x86_64 -stdlib=libc++  -c RcppExports.cpp -o RcppExports.o<br class=""><br class=""><cut><br class=""><br class="">/usr/bin/clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o RQuantLib.so RcppExports.o asian.o barrier_binary.o bermudan.o bonds.o calendars.o curves.o dates.o daycounter.o discount.o hullwhite.o implieds.o modules.o schedule.o utils.o vanilla.o zero.o -L/gaia/local/lib -L/opt/local/lib -lQuantLib -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation<br class="">duplicate symbol __ZNK8QuantLib24BaseCorrelationLossModelINS_20GaussianLHPLossModelENS_21BilinearInterpolationEE11setupModelsEv in:<br class="">    RcppExports.o<br class="">    asian.o<br class=""><br class=""><br class=""><cut><br class=""><br class="">duplicate symbol __ZNK8QuantLib24BaseCorrelationLossModelINS_26InhomogeneousPoolLossModelINS_20GaussianCopulaPolicyEEENS_21BilinearInterpolationEE11setupModelsEv in:<br class="">    RcppExports.o<br class="">    zero.o<br class="">ld: 64 duplicate symbols for architecture x86_64<br class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">make: *** [RQuantLib.so] Error 1<br class="">ERROR: compilation failed for package ‘RQuantLib’<br class="">* removing ‘/Users/wasi/Library/R/3.1/library/RQuantLib’<br class="">Mac:downloaded_packages wasi$ <br class=""><br class=""><br class=""><br class="">Environment OSX<br class=""><br class=""><br class="">uname -a<br class="">Darwin Mac.fritz.box 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64<br class=""><br class=""><br class="">Mac:downloaded_packages wasi$ clang++ --version<br class="">Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)<br class="">Target: x86_64-apple-darwin14.1.0<br class="">Thread model: posix<br class=""><br class=""><br class=""><br class="">Mac:downloaded_packages wasi$ R --version<br class="">R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"<br class="">Copyright (C) 2014 The R Foundation for Statistical Computing<br class="">Platform: x86_64-apple-darwin14.0.0 (64-bit)<br class=""><br class="">R is free software and comes with ABSOLUTELY NO WARRANTY.<br class="">You are welcome to redistribute it under the terms of the<br class="">GNU General Public License versions 2 or 3.<br class="">For more information about these matters see<br class=""><a href="http://www.gnu.org/licenses/" class="">http://www.gnu.org/licenses/</a>.<br class=""><br class=""><br class=""><br class="">Mac:downloaded_packages wasi$ quantlib-config --version<br class="">1.5<br class=""><br class=""><br class=""><br class="">Mac:downloaded_packages wasi$ more RQuantLib/DESCRIPTION <br class="">Package: RQuantLib<br class="">Title: R Interface to the QuantLib Library<br class="">Version: 0.4.0<br class="">Date: 2014-12-01<br class="">Maintainer: Dirk Eddelbuettel <edd@debian.org><br class="">Author: Dirk Eddelbuettel, Khanh Nguyen (during 2009-2010)<br class="">Description: The RQuantLib package makes parts of QuantLib accessible from R<br class=""> The QuantLib project aims to provide a comprehensive software framework for<br class=""> quantitative finance. The goal is to provide a standard open source library<br class=""> for quantitative analysis, modeling, trading, and risk management of<br class=""> financial assets.<br class="">Depends: R (>= 2.10.0)<br class="">Suggests: rgl, zoo, RUnit<br class="">Imports: methods, Rcpp (>= 0.11.0)<br class="">LinkingTo: Rcpp<br class="">SystemRequirements: QuantLib library (>= 1.4.0) from<br class="">        http://quantlib.org, Boost library from http://www.boost.org<br class="">License: GPL (>= 2)<br class="">URL: http://quantlib.org<br class="">        http://dirk.eddelbuettel.com/code/rquantlib.html<br class="">Packaged: 2014-12-01 12:10:25.68506 UTC; edd<br class="">NeedsCompilation: yes<br class="">Repository: CRAN<br class="">Date/Publication: 2014-12-02 12:18:45<br class=""><br class=""><br class=""><u class="">APPENDIX/LINUX</u><br class=""><br class="">Linux/Ubuntu works fine without any problems:<br class=""><br class="">- sudo apt-get install r-base libboost-all-dev libquantlib0  libquantlib0-dev <br class="">- tar -xzf RQuantLib-current.tar.gz<br class=""><br class="">wasi@ubuntu:~/work$ R CMD INSTALL RQuantLib<br class="">* installing to library ‘/home/wasi/R/x86_64-pc-linux-gnu-library/3.0’<br class="">* installing *source* package ‘RQuantLib’ ...<br class="">checking for g++... g++<br class="">checking whether the C++ compiler works... yes<br class="">checking for C++ compiler default output file name... a.out<br class="">checking for suffix of executables... <br class="">checking whether we are cross compiling... no<br class="">checking for suffix of object files... o<br class="">checking whether we are using the GNU C++ compiler... yes<br class="">checking whether g++ accepts -g... yes<br class="">checking how to run the C++ preprocessor... g++ -E<br class="">checking whether we are using the GNU C++ compiler... (cached) yes<br class="">checking whether g++ accepts -g... (cached) yes<br class="">checking for R... yes<br class="">checking for quantlib-config... yes<br class="">checking for Boost development files... yes<br class="">checking for minimal Boost version... yes<br class="">configure: creating ./config.status<br class="">config.status: creating src/Makevars<br class="">Completed configuration and ready to build.<br class="">** libs<br class="">g++ -I/usr/share/R/include -DNDEBUG   -I"/home/wasi/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"  -O3 -pipe -g  -I/usr/include -fpermissive -I../inst/include -I. -fpic  -O3 -pipe  -g  -c asian.cpp -o asian.o<br class=""><br class=""><cut><br class=""><br class="">g++ -I/usr/share/R/include -DNDEBUG   -I"/home/wasi/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"  -O3 -pipe -g  -I/usr/include -fpermissive -I../inst/include -I. -fpic  -O3 -pipe  -g  -c zero.cpp -o zero.o<br class="">g++ -shared -o RQuantLib.so asian.o barrier_binary.o bermudan.o bonds.o calendars.o curves.o daycounter.o discount.o hullwhite.o implieds.o modules.o utils.o vanilla.o zero.o -L/usr/lib -lQuantLib -L/usr/lib/R/lib -lR<br class="">installing to /home/wasi/R/x86_64-pc-linux-gnu-library/3.0/RQuantLib/libs<br class="">** R<br class="">** demo<br class="">** inst<br class="">** preparing package for lazy loading<br class="">** help<br class="">*** installing help indices<br class="">** building package indices<br class="">** testing if installed package can be loaded<br class="">* DONE (RQuantLib)<br class="">wasi@ubuntu:~/work$ </div></body></html>