Weird encounter installing OpenCV 3.0.0
I installed openCV 3.0.0, but did not want it to interfere with my 2.4.10 install so I installed it in a separate folder. The commands I used are as follows:-
- cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/app/ocv3 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/ -D WITH_CUDA=OFF -D WITH_OPENCL=OFF ..
- make -j8
- sudo make install
When I checked my /app/ocv3/lib (Where the libraries had been installed), there were a bunch odd files ending in a ".a" extension. As a result, none of the code compiled. I must have kept installing it over and over and finally there were regular ".so" files. This helped compile my code.
My question: What are these ".a" files and How did the ".so" files get installed by luck? Is there anything that I did wrong that could have caused this to happen?
.a files are static library files (counterpart of the shared library files; the .so's your talking about). Have a look at cmake' BUILD_SHARED_LIBS variable. So inspect your cmake output and/or try forcing it with -DBUILD_SHARED_LIBS=ON
Thanks! It worked with the -D BUILD_SHARED_LIBS=ON. For sake of argument, is there a way to compile code with static library files?