sausax / pose_estimation

4 stars 1 forks source link

/usr/bin/ld: cannot find -lclapack #1

Closed monajalal closed 6 years ago

monajalal commented 6 years ago

I got two errors:

first for cv::ml and then I commented it and got this one. Can you also say how to fix the namespace problem with cv::ml rather than commenting it?

[jalal@goku c++]$ make
Scanning dependencies of target TestSVM
[ 25%] Building CXX object CMakeFiles/TestSVM.dir/TestSVM.cpp.o
/scratch2/body_pose/pose_estimation/c++/TestSVM.cpp:18:21: error: ‘ml’ is not a namespace-name
 using namespace cv::ml;
                     ^
/scratch2/body_pose/pose_estimation/c++/TestSVM.cpp:18:23: error: expected namespace-name before ‘;’ token
 using namespace cv::ml;
                       ^
make[2]: *** [CMakeFiles/TestSVM.dir/TestSVM.cpp.o] Error 1
make[1]: *** [CMakeFiles/TestSVM.dir/all] Error 2
make: *** [all] Error 2

modified the code to

using namespace cv;
//using namespace cv::ml;
[jalal@goku c++]$ vi TestSVM.cpp 
[jalal@goku c++]$ make
[ 25%] Building CXX object CMakeFiles/TestSVM.dir/TestSVM.cpp.o
/scratch2/body_pose/pose_estimation/c++/TestSVM.cpp:18:21: error: ‘ml’ is not a namespace-name
 using namespace cv::ml;
                     ^
/scratch2/body_pose/pose_estimation/c++/TestSVM.cpp:18:23: error: expected namespace-name before ‘;’ token
 using namespace cv::ml;
                       ^
make[2]: *** [CMakeFiles/TestSVM.dir/TestSVM.cpp.o] Error 1
make[1]: *** [CMakeFiles/TestSVM.dir/all] Error 2
make: *** [all] Error 2
[jalal@goku c++]$ ls
CMakeCache.txt  CMakeFiles  CMakeLists.txt  Makefile  TestSVM.cpp  TrainSVM.cpp  cmake_install.cmake  json.hpp  trained_svms
[jalal@goku c++]$ vi TestSVM.cpp 
[jalal@goku c++]$ make
Scanning dependencies of target TestSVM
[ 25%] Building CXX object CMakeFiles/TestSVM.dir/TestSVM.cpp.o
[ 50%] Linking CXX executable TestSVM
/usr/bin/ld: cannot find -lclapack
collect2: error: ld returned 1 exit status
make[2]: *** [TestSVM] Error 1
make[1]: *** [CMakeFiles/TestSVM.dir/all] Error 2
make: *** [all] Error 2
monajalal commented 6 years ago

https://github.com/SciRuby/nmatrix/commit/d126005ca9ce8339c54a80accaa835904f304f6c