- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是OpenCV的新手,已经在Ubuntu上安装了它。当我尝试运行存储在opencv-2.4.0/samples/c
中的示例程序facedetect.cpp时,无法正常工作。
我试图通过以下命令运行它:
g++ \`pkg-config --cflags --libs opencv\` facedetect.cpp -o opencv
/tmp/ccKQ8N39.o: In function `main':
facedetect.cpp:(.text+0x1b9): undefined reference to `cv::CascadeClassifier::CascadeClassifier()'
facedetect.cpp:(.text+0x1c7): undefined reference to `cv::CascadeClassifier::CascadeClassifier()'
facedetect.cpp:(.text+0x3ac): undefined reference to `cv::CascadeClassifier::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
facedetect.cpp:(.text+0x589): undefined reference to `cv::CascadeClassifier::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
facedetect.cpp:(.text+0x674): undefined reference to `cvCreateCameraCapture'
facedetect.cpp:(.text+0x744): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
facedetect.cpp:(.text+0x799): undefined reference to `cvCreateFileCapture'
facedetect.cpp:(.text+0x824): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
facedetect.cpp:(.text+0x8b3): undefined reference to `cvNamedWindow'
facedetect.cpp:(.text+0x8f6): undefined reference to `cvQueryFrame'
facedetect.cpp:(.text+0x91c): undefined reference to `cv::Mat::Mat(_IplImage const*, bool)'
facedetect.cpp:(.text+0x97d): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
facedetect.cpp:(.text+0x995): undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const'
facedetect.cpp:(.text+0x9af): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
facedetect.cpp:(.text+0x9c7): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
facedetect.cpp:(.text+0x9e7): undefined reference to `cv::flip(cv::_InputArray const&, cv::_OutputArray const&, int)'
facedetect.cpp:(.text+0xa1f): undefined reference to `cv::waitKey(int)'
facedetect.cpp:(.text+0xa3b): undefined reference to `cv::waitKey(int)'
facedetect.cpp:(.text+0xa49): undefined reference to `cvReleaseCapture'
facedetect.cpp:(.text+0xabf): undefined reference to `cv::waitKey(int)'
facedetect.cpp:(.text+0xbfe): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
facedetect.cpp:(.text+0xc90): undefined reference to `cv::waitKey(int)'
facedetect.cpp:(.text+0xd33): undefined reference to `cvDestroyWindow'
facedetect.cpp:(.text+0xd46): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
facedetect.cpp:(.text+0xd54): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
facedetect.cpp:(.text+0xeaf): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
facedetect.cpp:(.text+0xec1): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
/tmp/ccKQ8N39.o: In function `detectAndDraw(cv::Mat&, cv::CascadeClassifier&, cv::CascadeClassifier&, double)':
facedetect.cpp:(.text+0x1278): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
facedetect.cpp:(.text+0x128d): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
facedetect.cpp:(.text+0x12b5): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
facedetect.cpp:(.text+0x12e8): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
facedetect.cpp:(.text+0x1300): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
facedetect.cpp:(.text+0x1333): undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
facedetect.cpp:(.text+0x134b): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
facedetect.cpp:(.text+0x1363): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
facedetect.cpp:(.text+0x137b): undefined reference to `cv::equalizeHist(cv::_InputArray const&, cv::_OutputArray const&)'
facedetect.cpp:(.text+0x1380): undefined reference to `cvGetTickCount'
facedetect.cpp:(.text+0x140e): undefined reference to `cvGetTickCount'
facedetect.cpp:(.text+0x142b): undefined reference to `cvGetTickFrequency'
facedetect.cpp:(.text+0x160b): undefined reference to `cv::circle(cv::Mat&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'
facedetect.cpp:(.text+0x187e): undefined reference to `cv::circle(cv::Mat&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'
facedetect.cpp:(.text+0x1959): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
facedetect.cpp:(.text+0x1993): undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
/tmp/ccKQ8N39.o: In function `cv::Mat::~Mat()':
facedetect.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x2b): undefined reference to `cv::fastFree(void*)'
/tmp/ccKQ8N39.o: In function `cv::Mat::operator=(cv::Mat const&)':
facedetect.cpp:(.text._ZN2cv3MataSERKS0_[cv::Mat::operator=(cv::Mat const&)]+0xf2): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
/tmp/ccKQ8N39.o: In function `cv::Mat::create(int, int, int)':
facedetect.cpp:(.text._ZN2cv3Mat6createEiii[cv::Mat::create(int, int, int)]+0x81): undefined reference to `cv::Mat::create(int, int const*, int)'
/tmp/ccKQ8N39.o: In function `cv::Mat::release()':
facedetect.cpp:(.text._ZN2cv3Mat7releaseEv[cv::Mat::release()]+0x3b): undefined reference to `cv::Mat::deallocate()'
/tmp/ccKQ8N39.o: In function `cv::Mat::operator()(cv::Rect_<int> const&) const':
facedetect.cpp:(.text._ZNK2cv3MatclERKNS_5Rect_IiEE[cv::Mat::operator()(cv::Rect_<int> const&) const]+0x1b): undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)'
collect2: ld returned 1 exit status
最佳答案
g++ facedetect.cpp -o opencv `pkg-config --cflags --libs opencv`
关于opencv - 使用代码g++ `pkg-config --cflags --libs opencv` facedetect.cpp -o opencv运行的opencv2.4.0程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21863165/
根据 g++ -print-search-dirs,我的 C++ 编译器正在许多目录中搜索库,包括 ... /lib/../lib/: /usr/lib/../lib/: /库/: /usr/lib/
我在 GLUT 演示的顶部看到了代码,我很好奇它的功能。 为什么有人要编写#pragma 而不是只包含库? 最佳答案 此 pragma 允许库作者根据一系列可在编译时分析的标准定义库导入。例如,您可以
Intel describes libm.lib 作为静态库,libmmt.lib 作为多线程静态库 (/MT) 和 libmmds.lib 作为多线程静态库 (/MD) 都实现了 LibM Math
我在 Windows 7 32 位上使用 Visual Studio 2010。 我在 http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-
我正在尝试将一些 html 转换为 pdf。经过一些谷歌搜索后,我发现 dompdf但是当我尝试转换时,我会检索 PHP-font-lib must either be installed via c
目前我的visual studio基本上是在生成Engine.dll和Game.exe Engine.dll 链接到其他一些基本库,例如:d3dx9d.libComCtl32.libWinMM.lib
我正在尝试将 material-ui 用于项目。使用它时会抛出以下错误: 我曾尝试通过 github 存储库解决类似问题,但没有任何运气。任何人都有任何想法可能是什么问题?我正在添加 package.
为了简化,我有两个库:libA.lib、libB.lib libA 具有以下功能: void read(num,*val){ *val=Globalval[num]; ... } libB: void
我有一个包含两个项目的 VS2010 解决方案。第一个项目 [DevLib] 是一个库,它基本上是另一个我们没有源代码的库 [ExtLib] 的包装器。构建这个库工作正常。 第二个项目 [TestAp
我想用我做了一些小更改的系统库替换它。这两个库都是使用相同版本的cyanogenmod 源代码编译的。我复制到 SD 卡的那个可以在早期的 CM 闪存上运行。 现在我尝试运行以下命令: $ adb s
我正在使用源代码中的Postgres 13(Rel_13_STRATE分支),并且我使用的是来自apachea/age源代码的(Release/PG13/1.3.0分支)中的1.3.0版的Apache
看起来 Jetty 团队想要在版本 6 和 7 之间进行一些 Spring 清理,并且看起来好像一个有用的系统属性“jetty.lib”不存在、不起作用,或者只是在未指定的情况下发生了更改以便使我的
我正在尝试使用 unixODBC 连接到 Oracle,但它不起作用。到目前为止,我已经尝试关注 How do I setup Oracle ODBC drivers on RHEL 6/Linux
我在我的 Linux Mint 14 Nadia 中安装了 Matlab(a uname -a 显示:Linux Ideapad-Z570 3.5.0-17-generic#28-Ubuntu SMP
我有一个需要使用 macdeployqt 设置的应用程序,但是当我调用它时,它告诉我它无法在/usr/lib/目录中找到一些库。 在调用 macdeployqt 之前,我必须将 3 个库 (.tx)
此特定问题是由于指定对路径中包含空格的 lib 文件的依赖项引起的。路径需要用引号括起来,项目才能正确编译。 在项目属性的Configuration Properties -> Linker -> I
我正在努力尝试让 OpenCV 2.2 库与我的项目(运行 VSC++,2010)一起工作。我按照 http://opencv.willowgarage.com/wiki/VisualC%2B%2B
总而言之,我想要的是避免在多个 .dll 中出现重复的 .lib 文件,因为生成的 .dll 将在一个 .exe 文件中一起使用,这会使 .lib 文件中的全局状态重复。 具体问题: 我有一个包含 3
我正在尝试使用 Intel TBB 和 IPP 构建 OpenCV v2.3.1。我使用 CMake 生成 Visual Studio 2010 解决方案。构建成功,我在输出中有 opencv_cor
我不明白 use local::lib 经常做 use lib 没有。有人可以解释一下吗? 最佳答案 常规 use lib foo几乎就像这样简单: BEGIN { unshift(@INC, foo
我是一名优秀的程序员,十分优秀!