Building OpenCV 2.0 on Mac OS X 10.6

I first tried it this way:


$ cd OpenCV-2.0.0
$ mkdir build
$ cd build
$ cmake ..
$ make

But it failed. I got lots of errors when trying to link highgui to the Carbon libraries. The problem is that Carbon is 32-bit only, and by default OpenCV was being built for 64-bit.

Here the (very simple) solution to that:


$ CFLAGS="-arch i386" CXXFLAGS="-arch i386" cmake ..
$ make

This entry was posted in English, Mac, OpenCV, Programming. Bookmark the permalink.

One Response to Building OpenCV 2.0 on Mac OS X 10.6

  1. Também tive que usar o arch=386 para tentar compilar um programa com a SDL (no fim tive que usar um template para o xCode porque tinha um erro no linker que não consegui resolver por causa da lerdeza da vm de mac, mas eu aposto que esse template já tem o arch nele).
    Pelov isto a maioria dos programas não tá nem aí pra compilar em PPC.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">