Weird encounter installing OpenCV 3.0.0

asked 2015-02-14 08:16:44 -0600

Potato gravatar image

updated 2015-02-14 14:54:37 -0600

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?

edit retag flag offensive close merge delete

Comments

.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

boaz001 gravatar imageboaz001 ( 2015-02-15 16:58:48 -0600 )edit

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?

Potato gravatar imagePotato ( 2015-02-17 07:06:41 -0600 )edit