collect2: error: ld returned 1 exit status

asked 2015-11-18 10:18:01 -0600

Tiras gravatar image

updated 2015-11-19 10:22:23 -0600

I am now practicing new library for my app.
Here is what I have done so far with 3rd party lib.

root@cmd-center:/home/sarit/clandmark/build# make install
[ 44%] Built target clandmark
[ 88%] Built target flandmark
[ 94%] Built target static_input
[100%] Built target video_input
Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkTargets.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkTargets-release.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkConfig.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkConfigVersion.cmake
-- Installing: /usr/local/include/rapidxml_print.hpp
-- Installing: /usr/local/include/rapidxml.hpp
-- Installing: /usr/local/include/rapidxml_utils.hpp
-- Installing: /usr/local/include/rapidxml_iterators.hpp
-- Installing: /usr/local/share/doc/clandmark/manual.html
-- Installing: /usr/local/share/doc/clandmark/license.txt
-- Installing: /usr/local/include/CImg.h
-- Installing: /usr/local/share/doc/clandmark/README.txt
-- Installing: /usr/local/share/doc/clandmark/Licence_CeCILL_V2-en.txt
-- Installing: /usr/local/share/doc/clandmark/Licence_CeCILL-C_V1-en.txt
-- Installing: /usr/local/lib/libclandmark.so.1.5
-- Installing: /usr/local/lib/libclandmark.so.1
-- Installing: /usr/local/lib/libclandmark.so
-- Installing: /usr/local/lib/libflandmark.so.1.5
-- Installing: /usr/local/lib/libflandmark.so.1
-- Installing: /usr/local/lib/libflandmark.so
-- Removed runtime path from "/usr/local/lib/libflandmark.so.1.5"
-- Installing: /usr/local/include/msvc-compat.h
-- Installing: /usr/local/include/base64.h
-- Installing: /usr/local/include/CLandmark.h
-- Installing: /usr/local/include/CFeaturePool.h
-- Installing: /usr/local/include/CFeatures.h
-- Installing: /usr/local/include/CAppearanceModel.h
-- Installing: /usr/local/include/CDeformationCost.h
-- Installing: /usr/local/include/CLoss.h
-- Installing: /usr/local/include/CMaxSumSolver.h
-- Installing: /usr/local/include/CXMLInOut.h
-- Installing: /usr/local/include/CTimer.h
-- Installing: /usr/local/include/CTypes.h
-- Installing: /usr/local/include/CLandmarkConfig.h
-- Installing: /usr/local/include/Flandmark.h
-- Installing: /usr/local/include/CSparseLBPFeatures.h
-- Installing: /usr/local/include/CSparseLBPAppearanceModel.h
-- Installing: /usr/local/include/CDisplacementDeformationCost.h
-- Installing: /usr/local/include/CNormalizedEuclideanLoss.h
-- Installing: /usr/local/include/CTableLoss.h
-- Installing: /usr/local/include/CZeroLoss.h
-- Installing: /usr/local/include/CTreeMaxSumSolver.h
-- Installing: /usr/local/share/clandmark/models/flandmark_model.xml
-- Installing: /usr/local/share/clandmark/models/haarcascade_frontalface_alt.xml
-- Installing: /usr/local/share/clandmark/examples/static_input
-- Removed runtime path from "/usr/local/share/clandmark/examples/static_input"
-- Installing: /usr/local/share/clandmark/examples/video_input
-- Removed runtime path from "/usr/local/share/clandmark/examples/video_input"

Here is the libclandmark location.

sarit@cmd-center:~/clandmark/libclandmark$ pwd
/home/sarit/clandmark/libclandmark
sarit@cmd-center:~/clandmark/libclandmark$ ls
base64.h              CDeformationCost.h                CFeatures.h               CLoss.h                       CSparseLBPAppearanceModel.cpp  CTimer.h               CZeroLoss.cpp             msvc-compat.h
CAppearanceModel.cpp  CDisplacementDeformationCost.cpp  clandmarkConfig.cmake.in  CMakeLists.txt                CSparseLBPAppearanceModel.h    CTreeMaxSumSolver.cpp  CZeroLoss.h
CAppearanceModel.h    CDisplacementDeformationCost.h    CLandmarkConfig.h.in      CMaxSumSolver.cpp             CSparseLBPFeatures.cpp         CTreeMaxSumSolver.h    flandmarkConfig.cmake.in
CDAGMaxSumSolver.cpp  CFeaturePool.cpp                  CLandmark.cpp             CMaxSumSolver.h               CSparseLBPFeatures.h           CTypes.h               Flandmark.cpp
CDAGMaxSumSolver.h    CFeaturePool.h                    CLandmark.h               CNormalizedEuclideanLoss.cpp  CTableLoss.cpp                 CXMLInOut.cpp          Flandmark.h
CDeformationCost.cpp  CFeatures.cpp                     CLoss.cpp                 CNormalizedEuclideanLoss.h    CTableLoss.h                   CXMLInOut.h            helpers.h

Compile :

$ g++ `pkg-config --cflags opencv` static_input.cpp -o static_input.out ...
(more)
edit retag flag offensive close merge delete

Comments

1

hmm, whatever you meant to achieve here, it looks wrong: -l/home/sarit/clandmark/libclandmark/

it probably should be -L/path/to/some/folder -lsome_library

berak gravatar imageberak ( 2015-11-18 11:19:42 -0600 )edit

I am away from my computer. When I reach it I will update to you as fast as I can.

Tiras gravatar imageTiras ( 2015-11-18 19:28:45 -0600 )edit

Thank you berak. sarit@cmd-center:~/clandmark/examples$ g++ pkg-config --cflags opencv static_input.cpp -o static_input.out pkg-config --libs opencv -L/usr/local/include -lclandmark -lflandmark The compilation is done, but got error while loading shared libraries: libclandmark.so.1: cannot open shared object file: No such file or directory. $ ldconfig -v will solve library problem

Tiras gravatar imageTiras ( 2015-11-19 10:32:42 -0600 )edit