32-bit OpenCV on OS X Lion? Possible?

I’ve been trying to find work for many years and trying to figure out how to get 32-bit OpenCV that works with OS X Lion, but can just find the 64-bit version.

So, I have the following questions:

OpenCV libraries come in 32-bit or 64-bit architecture, is this true?

How to get 32-bit OpenCV working on Lion? I tried the following methods: - Install OpenCV via MacPorts: no, MacPorts installs the 64-bit version .BI removed OpenCV and MacPorts.

  • Install OpenCV 2.4.1 via Homebrew using the following command:

brew install OpenCV --build32

but it looks like they are also 64-bit. Removed OpenCV and Homebrew.

  • Install OpenCV 2.4.1 yourself using standard unix makefiles. No, they still look like 64-bit.

I wrote “they look like 64-bit” because I need to replace OpenC with an Xcode project made under OS X Snow Leopard targeting a 32-bit Mac, and I always get a ton of errors, such as:

ld: warning: ignoring file / usr / local / Cellar / opencv / 2.4.1 / lib / libopencv_calib3d.2.4.1.dylib, the file was created for an unsupported file format that is not architecture related (i386)

therefore, I believe that OpenCV stuff is 64-bit. If I make the project work in 64-bit mode, it rubs, but does not work properly and gets stuck.

Is there a standard way to check if my OpenCV libraries are 64-bit or 32-bit?

Where can I get 32-bit OpenCV?

+3
source share
4 answers

Solved a problem.

Recap: 32- OpenCV 64- Mac OSX Lion.

?

1: OpenCV 2.4.0

2. CMake.

3: OpenCV.

4: OpenCV

mkdir build
cd build
cmake -G "Unix Makefiles" -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C_FLAGS=-m32 -D CMAKE_CXX_FLAGS=-m32 ..

( 32- )

make -j8
sudo make install

5: !

Mac OS X OpenCV

, :

@karlphilip: , , make , .

@hamstergene: MacPorts , , :( (, , ).

@Adrien: , , 2 :)

+8

OpenCv . , , - .

.

+2

- OpenCV . , OpenCV 32- Mac OS Lion.

Sadeep Tech Blog, .

, !

+2

: OpenCV 2.4 CMakeLists.txt . 242 :

# ----------------------------------------------------------------------------
#  Path for build/platform -specific headers
# ----------------------------------------------------------------------------
set(OPENCV_CONFIG_FILE_INCLUDE_DIR "${CMAKE_BINARY_DIR}/" CACHE PATH "Where to create the platform-dependant cvconfig.h")
add_definitions(-DHAVE_CVCONFIG_H)
ocv_include_directories(${OPENCV_CONFIG_FILE_INCLUDE_DIR})

below the call add_definitions(), add the following:

 add_definitions(-m32)
0
source

All Articles