i need to rebuild the opencv.a lib for OF on OS X 10.10 opencv3.1, because i need to combine it with the opencv_contrib modules:
i tried with the cmake steps shown in that github and the image below.
but it did not generate the opencv.a file or structure seen in side the ofxOpenCv addon.
thanks for any advice.
You can try the script in apothecary.
You might need to modify the formula in addos/ofxOpenCV/scripts/formulas to point to 3.1 and to add the modules you want.
Then cd to the OF root/scripts/apothecary and do ./apothecary update ofxOpenCV
I’m writing this from memory but that is roughly the way the libs are generated for OF
Hmm now that I see your adding the external modules cmake is probably a better approach. You need to make sure your select static and not shared as the lib type.
Don’t worry about the lib names being different you can put them in the same folder as the old lib and remove the old lib and then use the project generator to make a project with the addon. The project generator will add the libs correctly.
i got cmake gui app:
followed these instruction for the static library but changed it to use SDKs/MacOSX10.10.sdk:
and added this path to the modules:
as mentioned here:
after running cmake gui.
then running in terminal make and make install.
terminal reports: “6 errors detected in the compilation of …”
here full report:
do i copy the libopencv_cudev.a where opencv.a current is?
do i have to copy anything else, like staticlibs/opencv2/opencv_modules.hpp ?
i am asking because ofxOpenCv’s folder structure is a bit different and ofxOpenCv/libs/opencv/opencv2 has a whole bunch of other files inside.
now the generated staticlib folder content looks like this:
tried cmake with CUDA unselected which produced less error looking terminal print out.
it also make a whole bunch of .a file
but i am still unsure how to proceed.
@theo any ideas?