I am developing a C++
project in Ubuntu
with kDevelop
as the IDE. The project makes use of openssl boost cryptopp
libraries. While building the project, I am getting the link error as /usr/bin/ld: cannot find -l/home/anz/openssl-1.0.1j/libssl.a
.
As far as I know, -l
comes along with the name of library(for e.g., -lcryptopp) and not its path. But why is -l
is present here before the path? The specified library do exist in this path.
How can I overcome this problem? Thankyou.
EDIT:
Portion from Cmakelists.txt:
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package( Boost COMPONENTS thread system date_time regex filesystem chrono)
include_directories(${Boost_INCLUDE_DIRS})
find_package (OpenSSL)
include_directories(${OPENSSL_INCLUDE_DIR})
message("LINKED :" ${OPENSSL_LIBRARIES}) # ALL THE LIBRARIES ARE LISTED HERE CORECTLY
ADD_EXECUTABLE(Abc ${Abc_SRC})
TARGET_LINK_LIBRARIES(Abc ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(Abc ${OPENSSL_LIBRARIES})
target_link_libraries(Abc ${CMAKE_DL_LIBS})
install(TARGETS Abc RUNTIME DESTINATION ./)
EDIT2: Screenshot added