Hi all, I have a problem but i am not sure that this is the right mailing list. I'm writing a R program which call a C++ program, through the function .Call. I use to compile the c++ script with the command R CMD SHLIB SpTempWrapC.cpp -Wall -l covmodel.h -l util.h Everything works fine since, for mistake, i paste in the terminal the content of the r-script. Now, when i try to compile, i received the following error: llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o SpTempWrapC.so SpTempWrapC.o -Wall -l covmodel.h -l util.h -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation covmodel.h:15:20: error: iostream: No such file or directory covmodel.h:16:18: error: string: No such file or directory covmodel.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?namespace? covmodel.h:20: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?covmodel? util.h:12:20: error: iostream: No such file or directory util.h:13:19: error: iomanip: No such file or directory util.h:14:18: error: string: No such file or directory util.h:15:19: error: sstream: No such file or directory util.h:16:18: error: vector: No such file or directory util.h:17:15: error: map: No such file or directory util.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?namespace? util.h:20:15: error: R.h: No such file or directory util.h:21:19: error: Rmath.h: No such file or directory util.h:22:24: error: Rinternals.h: No such file or directory util.h:23:26: error: R_ext/Lapack.h: No such file or directory util.h:24:24: error: R_ext/BLAS.h: No such file or directory util.h:25:25: error: R_ext/Utils.h: No such file or directory util.h:29: error: expected declaration specifiers or ?...? before ?bool? I also tried to reinstall R. Thanks
R-devel Digest, Vol 125, Issue 2
4 messages · gianluca mastrantonio, Peter Dalgaard, Simon Urbanek
On Jul 4, 2013, at 09:34 , gianluca mastrantonio wrote:
Hi all, I have a problem but i am not sure that this is the right mailing list. I'm writing a R program which call a C++ program, through the function .Call. I use to compile the c++ script with the command R CMD SHLIB SpTempWrapC.cpp -Wall -l covmodel.h -l util.h
That doesn't look right. "-l" is usually something with linking, "-I" intended?
Everything works fine since, for mistake, i paste in the terminal the content of the r-script. Now, when i try to compile, i received the following error: llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o SpTempWrapC.so SpTempWrapC.o -Wall -l covmodel.h -l util.h -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation covmodel.h:15:20: error: iostream: No such file or directory covmodel.h:16:18: error: string: No such file or directory covmodel.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?namespace? covmodel.h:20: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?covmodel? util.h:12:20: error: iostream: No such file or directory util.h:13:19: error: iomanip: No such file or directory util.h:14:18: error: string: No such file or directory util.h:15:19: error: sstream: No such file or directory util.h:16:18: error: vector: No such file or directory util.h:17:15: error: map: No such file or directory util.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?namespace? util.h:20:15: error: R.h: No such file or directory util.h:21:19: error: Rmath.h: No such file or directory util.h:22:24: error: Rinternals.h: No such file or directory util.h:23:26: error: R_ext/Lapack.h: No such file or directory util.h:24:24: error: R_ext/BLAS.h: No such file or directory util.h:25:25: error: R_ext/Utils.h: No such file or directory util.h:29: error: expected declaration specifiers or ?...? before ?bool? I also tried to reinstall R. Thanks
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20130704/5caa97ed/attachment.pl>
1 day later
On Jul 4, 2013, at 3:53 AM, gianluca mastrantonio wrote:
I'm just a beginner, so i can make some stupid error. I use the "-l cov.model.h -l util.h" because i need to load another two c++ programs (cov.model.cpp and util.cpp)
Well,then you probably meant R CMD SHLIB SpTempWrapC.cpp cov.model.cpp util.cpp Cheers, S
Il giorno 04/lug/2013, alle ore 09:44, peter dalgaard <pdalgd at gmail.com> ha scritto:
-I
[[alternative HTML version deleted]]
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel