how to solve the problem of cannot determine linker language for target?
hi:)
when i build the program, found the error like 'cannot determine linker language for link target
below is the my cmakelist.txt's content
find_package(catkin REQUIRED COMPONENTS
rospy
std_msgs
OpenCV
)
catkin_python_setup()
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_executable(opencv_test2 script/opencv_test2.py)
target_link_libraries(opencv_test2
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
install(PROGRAMS
script/opencv_test2.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
please, how to solve this problem?
please know where is the problem exactly.
Edit:
i revised my cmakelist.txt
but occur the error that ' cannot speify link libraries for target " scripts/opencv_test1.py" which is not built by this project.
note opencv_test1.py can execute
what is the problem?
i must solve this problem. pleas help me
cmake_minimum_required(VERSION 2.8.3)
project(opencv_test1)
find_package(catkin REQUIRED COMPONENTS
rospy
std_msgs
)
find_package(OpenCV REQUIRED)
catkin_package(
LIBRARIES opencv_test1
CATKIN_DEPENDS opencv2 rospy std_msgs
DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
target_link_libraries(scripts/opencv_test1.py
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
Don't use answers to update your question, this is not a forum. Update your original question in the future.
I've moved the contents of your answer to your question.