Catkin - Cannot Find Custom Library I Made In Another Package
Hi,
I created a custom library in my package pack_A
like so:
...
catkin_package(
INCLUDE_DIRS include
LIBRARIES mycustomlib
# CATKIN_DEPENDS
# DEPENDS
)
add_library(mycustomlib STATIC src/customsource.cpp)
target_link_libraries(mycustomlib ${other_libs})
...
And then in another package, I include pack_A
and try to explicitly link against mycustomlib
it instead of using {catkin_LIBRARIES}
like so:
...
find_package(catkin REQUIRED COMPONENTS pack_A)
add_library(liblinktest src/test.cpp)
target_link_libraries(liblinktest mycustomlib)
...
However I get the error:
error: cannot find -lmycustomlib
Can anyone help me out? I do not want to link against {catkin_LIBRARIES}
. Thanks for your time.
EDIT: This... actually does build. However, I've been developing within QtCreator, and for some reason I get the "cannot find ..." error in QtCreator, but when I build via catkin_make, it builds just fine and runs.
Does anyone know why there is such a discrepancy between QtCreator and catkin_make here?