Use individual function definitions from OpenCV instead of using library.
I need to port my project to an embedded architecture. For that, is it possible to use function definitions instead of using libraries? I am working on Linux system (Ubuntu 12.04) and I need to to this because of some cross-compilation issues. If it is possible, how to do that?
i did not understand exaclty, what you mean with "use function definitions instead of using libraries",
but if your concern is, to get rid of the shared so's, then yes, you can build static libs from opencv, and link your prog against that ( resulting in 1 big binary chunk )
@berak Yes, I want to do either what you said or get the source code of the functions I am using in my project, build an SO file using my Makefile. And to avoid 1 big binary chunk, I want to know how to build these CV functions (compile and link flags, switches etc). I am using only core, imgproc and highgui.
if you're thinking of "ripping off a function here and there" -
bad idea.
@berak Not exactly ripping. My only requirement is to build only above mentioned three libraries separately, so that they will fit in my embedded project. Its more of "using precisely what's needed".
ah, ok. still go for static build, and leave the choice, what to take from the libs to the linker. will result in one chunk, but less (binary) than a smallish exe and so's (which contain functionality, you never use)
Ok. But can you suggest what basic options/switches for Makefile might be? Or any pointer to do so? I'm currently studying structure of cmake files and Makefiles generated by cmake for clues. But it's taking forever.
do yourself a favour, and use cmake-gui ;)
and that would be: BUILD_SHARED_LIBS=OFF