g++ app with openCV in static
Hi
I use openCV without extra modules in shared mode install, it's easy to compile my application:
g++ -std=c++11 -stdlib=libc++ Main.cpp -o app `pkg-config --cflags --libs /Users/xxx/Applications/opencv-3.2.0/opencv/build/unix-install/opencv.pc` -I/System/Library/Frameworks/JavaVM.framework/Headers
But when I compile openCv with -DBUILD_SHARED_LIBS=OFF option my command doesn't work !
I tested to make my app with cmake it's work, but I realy need to compile with g++ command.
Thx
cc
[edit] Ok second round:
here my command my Main.cpp and my command to compile:
#include <opencv2/core/core.hpp>
#include <iostream>
int main(int argc, char **argv){
std::cout << "hello" << std::endl;
cv::Mat img;
return 0;
}
g++ -std=c++0x Main.cpp -I /xxx/opencv/build/include -L /xxx/opencv/build/lib -lopencv_core -o Main
Command don't work and I had a very tall error:
Undefined symbols for architecture x86_64:
"_cblas_cgemm", referenced from:
lapack_gemm32fc(float const*, u ...
...
(many ... ...)
...
ld:
ld:
symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
invocation)
I dont' see one solution.
Obviously with cmake it's working, but here I need g++