国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

找不到opencv2/opencv.hpp,fatal error: opencv2/opencv.hpp: No such file or directory

這篇具有很好參考價值的文章主要介紹了找不到opencv2/opencv.hpp,fatal error: opencv2/opencv.hpp: No such file or directory。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

在CMakeLists.txt? 當中添加你的opencv.hpp 路徑即可。

我的opencv.hpp? 在?/usr/include/opencv2/

INCLUDE_DIRECTORIES(/usr/include/opencv2/)

通過命令include_directories來設(shè)置頭文件的搜索目錄文章來源地址http://www.zghlxwxcb.cn/news/detail-650998.html

# cmake needs this line
cmake_minimum_required(VERSION 3.1)

# Define project name
project(photo_get_project)

# Find OpenCV, you may need to set OpenCV_DIR variable
# to the absolute path to the directory containing OpenCVConfig.cmake file
# via the command line or GUI
find_package(OpenCV REQUIRED)

INCLUDE_DIRECTORIES(/usr/include/opencv2/)


# If the package has been found, several variables will
# be set, you can find the full list with descriptions
# in the OpenCVConfig.cmake file.
# Print some message showing some of them
message(STATUS "OpenCV library status:")
message(STATUS "    config: ${OpenCV_DIR}")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")

# Declare the executable target built from your sources
add_executable(photo_get photo_get.cpp)

# Link your application with OpenCV libraries
target_link_libraries(photo_get PRIVATE ${OpenCV_LIBS})

到了這里,關(guān)于找不到opencv2/opencv.hpp,fatal error: opencv2/opencv.hpp: No such file or directory的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • vscode中解決頭文件找不到問題,即fatal error: **.h: No such file or directory

    vscode中解決頭文件找不到問題,即fatal error: **.h: No such file or directory

    最近,在需要運行擁有頭文件的cpp代碼時候,vscode提示fatal error: **.h: No such file or directory 找不到頭文件或所在目錄。 這里記錄一下我的解決辦法。 1.設(shè)置launch.json 設(shè)置重點為加注釋的句子 ? 2.設(shè)置lauch.json 3. 按下F5 程序可正常尋找到頭文件,輸出結(jié)果正確 問題解決。 PS: 后

    2024年02月13日
    瀏覽(21)
  • 已解決:Opencv無法法打開包括文件: “opencv.hpp”: No such file or directory問題

    已解決:Opencv無法法打開包括文件: “opencv.hpp”: No such file or directory問題

    在VS平臺下的C++項目,添加opencv的頭文件失敗問題的解決方法 報錯:錯誤 error C1083: 無法打開包括文件: “opencv.hpp”: No such file or directory 我經(jīng)常出現(xiàn)這種報錯,現(xiàn)在終于找到了原因; 概括起來有以下三個方向: 1.項目屬性配置是否正確 2.項目目錄是否配置正確 3.頭文件的路徑

    2024年02月16日
    瀏覽(21)
  • Vitis報錯:fatal error: xxx.h: No such file or directory.

    Vivado、Vitis版本:2021.1 在編譯工程時出現(xiàn)了一堆錯誤,第一個錯誤就是fatal error: xxx.h: No such file or directory. 報錯的頭文件并不固定,嘗試調(diào)換頭文件位置,發(fā)現(xiàn)是main.c第一個頭文件。解決方法是在官網(wǎng)上看到的,歸納了一下放在這里,官網(wǎng)回答說這是一個版本BUG。 解決方法

    2024年02月11日
    瀏覽(59)
  • fatal error: linux/compiler-gcc9.h: No such file or directory

    fatal error: linux/compiler-gcc9.h: No such file or directory

    linux 找到README文件 mzh@DESKTOP-GITL67P:~$ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. ?There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ? 因為當前gcc版本是9.x, 找不到 compiler-gcc

    2024年02月09日
    瀏覽(22)
  • fatal error: opencv/cv.h: 沒有那個文件或目錄 錯誤;fatal error: opencv2/contrib/contrib.hpp: 沒有那個文件或目錄,opencv多版本

    1,替換 將各文件中的 #include opencv/cv.h替換為 #include opencv2/opencv.hpp即可 2,noetic自帶的是opencv4 另外,ORB SLAM要求OpenCV 3.0,noetic自帶的是opencv4,編譯仍會失敗 3,fatal error: opencv2/contrib/contrib.hpp: 沒有那個文件或目錄 opencv3中已經(jīng)沒有了contrib這個模塊,特別指出不是編譯opencv_contrib的

    2023年04月08日
    瀏覽(19)
  • 解決 fatal error: asm/bitsperlong.h: No such file or directory #include <asm/bitsperlong.h>

    解決 fatal error: asm/bitsperlong.h: No such file or directory #include <asm/bitsperlong.h>

    問題: ./include/uapi/asm-generic/int-ll64.h:12:10: fatal error: asm/bitsperlong.h: No such file or directory #include asm/bitsperlong.h 查看路徑其實是存在該文件的 最終問題解決: ? 使用命令查看當前是否設(shè)置了其他交叉編譯工具鏈 ? 若存在,比如我在~/.bashrc 中 永久設(shè)置了ARM架構(gòu)交叉編譯工具鏈,

    2024年02月03日
    瀏覽(53)
  • gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

    gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

    今天在Linux操作系統(tǒng)上開發(fā)C語言的時候,寫好了一個helloword代碼,想直接用gcc編譯運行, 沒想到直接給報錯?。?!

    2024年02月10日
    瀏覽(45)
  • 編譯 FastDFS 時報錯 fatal error: sf/sf_global.h: No such file or directory 解決辦法

    編譯 FastDFS 時報錯 fatal error: sf/sf_global.h: No such file or directory 解決辦法

    編譯 FastDFS 時,報錯如下 原因: 需要先編譯和安裝 libserverframe,新引入的網(wǎng)絡(luò)框架庫,下載地址:https://github.com/happyfish100 編譯安裝完后即可正常編譯安裝 FastDFS

    2024年02月21日
    瀏覽(40)
  • 【ubuntu】gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

    【ubuntu】gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory

    在 ubuntu 20.04 系統(tǒng)中編譯 graphlearning 源碼時出現(xiàn)如下報錯: 按照其他網(wǎng)友的方法,我使用了這條命令: sudo apt install g++-aarch64-linux-gn 但很不幸,又出現(xiàn)新的新的報錯: 報錯復(fù)報錯,報錯何其多。與其查博客,不如看信息。 于是乎,我還是老老實實地回到最開始,報錯的信息

    2024年02月12日
    瀏覽(20)
  • VScode中opencv頭文件報錯:cannot open source file “opencv2/highgui.hpp“

    VScode中opencv頭文件報錯:cannot open source file “opencv2/highgui.hpp“

    原因在于沒有配置好頭文件的路徑。 解決方法:找到頭文件的路徑,windows中一般是xxx/opencv/build/include/,這里面就包含了opencv和opencv2文件夾,里面就是頭文件。在VScode中按Ctrl+Shift+P輸入configuration在c_cpp_properties.json中includePath字段中添加找到的路徑即可。

    2024年02月07日
    瀏覽(23)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包