oracle - cmake not finding library needed for linking -
i converting make file cmake.
make: oracle = -l${oracle_home}/lib/ -lclntsh \ -i${oracle_home}/rdbms/public cmake: include_directories(${oracle_dir}/include) link_directories(${oracle_dir}/lib) project(db_i) add_executable(db_i db_i.c) target_link_libraries(db_i link_public ${project_link_libs} -lclntsh) install(targets db_i destination ${open_fox_bin_dir}) error: [ 53%] linking c executable db_i /usr/bin/ld: cannot find -lclntsh collect2: error: ld returned 1 exit status
i have oracle_home pointing directory files exist. compiler finding oci.h file needs.
directory structure... oracle_home include oci.h lib libclntsh.so
i have tried moving libraries same directory source. copied clntsh /usr/bin.
what missing? thanks
you don't need leading -l in target_link_libraries
target_link_libraries(db_i link_public ${project_link_libs} clntsh)
wiki
Comments
Post a Comment