Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compilation error /usr/bin/ld: cannot find -l&

This is the error i received when compiling and i am not sure how to fix this error.

[100%] Building CXX object vision/CMakeFiles/vision1.dir/src/vision.cpp.o
Linking CXX executable /home/chiongsterx/catkin_ws/devel/lib/vision/vision1
/usr/bin/ld: cannot find -l&
collect2: ld returned 1 exit status
make[2]: *** [/home/chiongsterx/catkin_ws/devel/lib/vision/vision1] Error 1
make[1]: *** [vision/CMakeFiles/vision1.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

This is my cmakelists. Not sure whethere package is placed correctly

find_package(catkin REQUIRED COMPONENTS
 roscpp
 rospy
 std_msgs
 cv_bridge
 image_geometry

)
find_package(OpenCV REQUIRED

)
include_directories(
${catkin_INCLUDE_DIRS} & ${OpenCV_INCLUDE_DIRS}
)
add_executable(vision1 src/vision.cpp)
target_link_libraries(vision1
   ${catkin_LIBRARIES} & ${OpenCV_LIBRARIES}
)

Compilation error /usr/bin/ld: cannot find -l&

This is the error i received when compiling and i am not sure how to fix this error.

[100%] Building CXX object vision/CMakeFiles/vision1.dir/src/vision.cpp.o
Linking CXX executable /home/chiongsterx/catkin_ws/devel/lib/vision/vision1
/usr/bin/ld: cannot find -l&
collect2: ld returned 1 exit status
make[2]: *** [/home/chiongsterx/catkin_ws/devel/lib/vision/vision1] Error 1
make[1]: *** [vision/CMakeFiles/vision1.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

This is my cmakelists. Not sure whethere package is placed correctly

find_package(catkin REQUIRED COMPONENTS
 roscpp
 rospy
 std_msgs
 cv_bridge
 image_geometry

)
find_package(OpenCV REQUIRED

)
include_directories(
${catkin_INCLUDE_DIRS} & ${OpenCV_INCLUDE_DIRS}
)
add_executable(vision1 src/vision.cpp)
target_link_libraries(vision1
   ${catkin_LIBRARIES} & ${OpenCV_LIBRARIES}
)