Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,請問一下 不用libtorch的話 可以用啥 #47

Open
jackft2 opened this issue Jul 1, 2020 · 0 comments
Open

你好,請問一下 不用libtorch的話 可以用啥 #47

jackft2 opened this issue Jul 1, 2020 · 0 comments

Comments

@jackft2
Copy link

jackft2 commented Jul 1, 2020

I met the same error, did you solve it ?

Yes I have solved it
My cmakelist is error

What's wrong with your cmakelist?

首先 不能用opencv4和libtorch
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(yolo-app)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV _INCLUDE_DIRS})
find_package(Torch REQUIRED)
aux_source_directory(. DIR_sRCS)
add_executable(yolo-app main.cpp)#注 main.cpp可以换成路径xxx/xxx.cpp
target_link_libraries(yolo-app "${TORCH_LIBRARIES}" "${OpenCV_LIBS}")
set_property(TARGET yolo-app PROPERTY CXX_STANDARD 11)

谢啦,我按你的CMakeList.txt改了下,还是有问题,后来又把main.cpp 改成了
${DIR_SRCS} 才解决这个问题。

Originally posted by @Arctanxy in #10 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant