私は make を初めて使用し、ここにある Qt 密度デモの RInside の例を実行しようとしています: http://dirk.eddelbuettel.com/blog/2011/03/25/。コードを次のファイルに保存しました。
main.cpp Makefile qtdensity.cpp include/qtdensity.h
Ubuntu 13.10 を実行しています。R、Rcpp、および Inside がインストールされています。ターミナルに行って実行すると
> make -f Makefile
エラーが発生します
make: *** No targets. Stop.
続行する方法を教えてください。
ありがとうございました
最初の回答にフォローアップを求める方法がわからないため、質問を拡張する必要があります。
ファイルを作成したばかりで、main.cpp、qtdensity.cpp、qtdensity.h、および qtdensity.pro で qmake を実行できましたが、make を実行しようとすると、次のエラーが発生します。
R関連のエラーがたくさん...
qtdensity.cpp:(.text+0x53a): undefined reference to `Rf_mkString'
qtdensity.cpp:(.text+0x54e): undefined reference to `Rf_install'
qtdensity.cpp:(.text+0x559): undefined reference to `Rf_findVarInFrame'
qtdensity.cpp:(.text+0x560): undefined reference to `R_UnboundValue'
...
qtdensity.cpp:(.text.startup+0x2a5): undefined reference to `R_NaReal'
qtdensity.cpp:(.text.startup+0x2b2): undefined reference to `R_NaN'
main.o: In function `_GLOBAL__sub_I_main':
main.cpp:(.text.startup+0x2a5): undefined reference to `R_NaReal'
main.cpp:(.text.startup+0x2b2): undefined reference to `R_NaN'
main.o: In function `main':
main.cpp:(.text.startup+0x352): undefined reference to `RInside::RInside(int, char const* const*, bool, bool, bool)'
main.cpp:(.text.startup+0x397): undefined reference to `RInside::~RInside()'
main.cpp:(.text.startup+0x3b3): undefined reference to `RInside::~RInside()'
moc_qtdensity.o: In function `_GLOBAL__sub_I__ZN9QtDensity18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv':
moc_qtdensity.cpp:(.text.startup+0x2a5): undefined reference to `R_NaReal'
moc_qtdensity.cpp:(.text.startup+0x2b2): undefined reference to `R_NaN'
collect2: error: ld returned 1 exit status
make: *** [qdensity] Error 1