Build Environment:
- 64 Bit Ubuntu 14.04
Supporting Libraries:
- OpenCV
I am able to generate 64 bit .so's in 64 bit Ubuntu environment.[Using GCC with OpenCV Built in 64 bit.] There is not problem in it.
I hope, if i want to build to 32 bit in 64 bit environment, i need to set -m32 flag and more importantly pointing or referring 32 bit supporting packages(OpenCV) Am i right here?
Steps i done:
Removed the 64 bit opencv library folder from the /usr/local of my 64 bit machine
Then,Copy and paste the Pre-build opencv library of 32 bit in /usr/local of my 64 bit machine
Created the sample opencv code and executed the following commands:
g++ -c -g -I/usr/local/include -I/usr/local/include/opencv -I/usr/local/include/opencv2 -m32 -o test.o opencvtest.cpp
g++ -shared -m32 -o test.so test.o -L/usr/local/lib /usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgcodecs.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_shape.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_ts.a /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videoio.so /usr/local/lib/libopencv_videostab.so
I have doubt in my steps ,whether i done the correct steps or not.
I am getting error. Please provide the answer if any one have tried.