Size of executable when static
Hi,
I use openCV without extra modules in static mode install. I compile my own application with cmake and -03 option.
My program work but the size of my executable is very hight > 60Mo.
I analysed process of compilation and do step by step compilation program and I see than when I add a filter such as "Blur" and "medianBlur" my programme take 40Mo of size.
What is the way to reduce size of program ?
EDIT: See my option compilation:
OpenCV modules:
-- To be built: core flann imgproc ml objdetect photo video imgcodecs shape videoio highgui superres ts features2d calib3d stitching videostab
-- Disabled: java world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz
i',m gettin more like 6.6 mb on ubuntu
On Windows I got ~7,5MB for a typical, small terminal application with static build until OpenCV 3.2. Since OpenCV 3.3 it is about twice the size ~19MB. I was wondering what causes this increase.
@carton99: Is this a release build? Did you play around with optimization fllags?
Yes I try with -DCMAKE_BUILD_TYPE=Release option and -Os and -03 optimization option