0
我正在使用OpenCv
庫在python
中編寫程序。我的項目文件夾是Foo,裏面有一個圖像和可執行文件。我CmakeLists.txt
看起來是這樣的:與Python和OpenCv鏈接
cmake_minimum_required(VERSION 2.8)
project(Foo)
find_package(OpenCV REQUIRED)
add_executable(Foo Im.py)
target_link_libraries(Foo ${OpenCV_LIBS} ${python2.7})
當我執行cmake .
我得到以下錯誤:
-- Configuring done
CMake Error: CMake can not determine linker language for target: Foo
CMake Error: Cannot determine link language for target "Foo".
-- Generating done
-- Build files have been written to: /home/user_name/OpenCv/Foo
我使用Python 2.7版和Linux 16.04。
沒錯,就是工作!謝謝! – Maria