首页 文章

github_install&R CMD INSTALL对videoplayR失败

提问于
浏览
0

我试图从github安装包videoplayR但是没有做同样的事情 . 我试过两种方法:

1.使用README文件中提到的安装指南 . 它给出了以下错误:

install_github(“sjmgarnier / videoplayR”)下载github repo sjmgarnier / videoplayR @ master函数错误(type,msg,asError = TRUE):

2.使用R CMD SHLIB等在运行R CMD检查时出现以下错误 . 它是install.out文件的一部分:

*安装源包'videoplayR'... ** libs g -I / usr / share / R / include -DNDEBUG -I“/ home / nandy / R / x86_64-pc-linux-gnu- library / 3.1 / Rcpp / include“-I”/ home / nandy / R / x86_64-pc-linux-gnu- library / 3.1 / RcppArmadillo / include“pkg-config --cflags opencv Rscript -e <p>'Rcpp ::: CxxFlags() '-fpic -g -O2 -fstack-protector --param = ssp-buffer-size = 4 -Wformat - Werror = format-security -D_FORTIFY_SOURCE = 2 -g -c RcppExports.cpp -o RcppExports.og -I / usr / share / R / include -DNDEBUG -I“/ home / nandy / R / x86_64-pc-linux-gnu-library / 3.1 / Rcpp / include”-I“/ home / nandy / R / x86_64-pc-linux- gnu-library / 3.1 / RcppArmadillo / include“pkg-config --cflags opencv Rscript -e <p>'Rcpp ::: CxxFlags()' - fpic -g -O2 -fstack-protector --param = ssp-buffer- size = 4 -Wformat - Werror = format-security -D_FORTIFY_SOURCE = 2 -g -c Video.cpp -o Video.o Video.cpp:在成员函数'double Video :: current_frame()'中:Video.cpp:42: 25:错误:'CV_CAP_PROP_POS_FRAMES'未在此范围返回中声明(inputVideo.get(CV_CAP_PROP_) POS_FRAMES)); ^ Video.cpp:在成员函数'void Video :: set_current_frame(int)':Video.cpp:46:18:错误:'CV_CAP_PROP_POS_FRAMES'未在此范围内声明inputVideo.set(CV_CAP_PROP_POS_FRAMES,n); ^ Video.cpp:在成员函数'void Video :: next_frame_cv()':Video.cpp:63:22:错误:'CV_CAP_PROP_POS_FRAMES'未在此范围内声明if(inputVideo.get(CV_CAP_PROP_POS_FRAMES)== inputVideo.get (CV_CAP_PROP_FRAME_COUNT)){^ Video.cpp:63:64:错误:'CV_CAP_PROP_FRAME_COUNT'未在此范围内声明if(inputVideo.get(CV_CAP_PROP_POS_FRAMES)== inputVideo.get(CV_CAP_PROP_FRAME_COUNT)){^ Video.cpp:In member function'void Video :: get_frame_cv(int)':Video.cpp:76:27:error:'CV_CAP_PROP_FRAME_COUNT'未在此范围内声明if(n> inputVideo.get(CV_CAP_PROP_FRAME_COUNT)){^ Video.cpp:80: 18:错误:'CV_CAP_PROP_POS_FRAMES'未在此范围内声明inputVideo.set(CV_CAP_PROP_POS_FRAMES,n); ^ Video.cpp:在成员函数'int Video :: length()'中:Video.cpp:91:25:错误:'CV_CAP_PROP_FRAME_COUNT'未在此范围内声明return(inputVideo.get(CV_CAP_PROP_FRAME_COUNT)); ^

我猜测问题2是由于OpenCV的版本问题而发生的 . 我对吗?这有什么办法吗?

1 回答

  • 1
    • 看起来类似于这两个报告的问题:https://github.com/hadley/devtools/issues/650https://github.com/hadley/devtools/issues/467 . 您似乎需要将您的系统(Linux我认为)更新为最新版本的Curl .

    • 我相信这是我的错 . 我忘了在上次将更改提交到GitHub仓库时排除已编译的共享对象videoplayR.so . 如果您使用的是与我不同的操作系统(OSX Yosemite),则肯定是您遇到问题的原因 . 我修复了它,现在它应该在你的计算机上很好地编译 .

    仅供参考我使用OpenCV 2.4.9和2.4.10编译和运行包,但它应该适用于任何2.4.X版本的OpenCV(从未尝试过最新的OpenCV 3.0 beta) .

相关问题