저는 make를 처음 사용하기 때문에 여기에 제공된 Qt 밀도 데모 용 RInside 예제를 실행하려고합니다 : http://dirk.eddelbuettel.com/blog/2011/03/25/. 나는 다음과 같은 파일에 코드를 저장 한 :내부 편집 : 대상 만들기
MAIN.CPP 메이크 qtdensity.cpp 내가 우분투 13.10를 실행하고/qtdensity.h
을 포함, 나는 R, Rcpp 및 내부가 설치되어 있습니다. 내가 터미널로 이동
> make -f Makefile
를 실행하면 나는
make: *** No targets. Stop.
날 진행 방법을 알려 주시기 바랍니다 오류를 얻을.
난 그냥 파일을 생성 할 수 있었다 한 :
내가 내 질문을 확장해야합니다 있도록이 첫 번째 대답 후속 물어 볼 수 없습니다주셔서 감사합니다 MAIN.CPP, qtdensity.cpp, qtdensity.h에 qmake를 실행하고 일을하지만, 어떤 qtdensity.pro를 걸 실행하려고 할 때, 나는 다음과 같은 오류를 얻을 : 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
는 R 또는 RInside와 연결하지 않았다. 시스템이 비표준 일 수 있습니다. 내가 너에게 보여준 것처럼 - 여기에서 일한다. –