question

alice-7236 avatar image
0 Votes"
alice-7236 asked alice-7236 published

IMPORTED_IMPLIB not set for imported target

I already build opencv library.
And write a project to use opencv

When I use generator vs2019, it will show the error.
I check the opencv folder and it has
opencv_structured_light445.lib opencv_reg445.lib opencv_saliency445.lib ...

find_package(OPENCV) can find these library

Here is my command
```
cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Debug ..
```


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_reg" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_rgbd" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_saliency" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_shape" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_stereo" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_structured_light"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_superres" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_surface_matching"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_text" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_tracking" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_videostab"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_wechat_qrcode"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_xfeatures2d"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_ximgproc" configuration
  "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  IMPORTED_IMPLIB not set for imported target "opencv_xobjdetect"
  configuration "RelWithDebInfo".

What should I do? It doesnt show line error.


But I try to use the command. Use ninja
```
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
```
Then it will success.

windows-serverwindows-8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers