0

I'm trying to compile my VST Plugin with Xcode4.1 in 32Bit. I'm using the Juce Framework and integrated OpenCV 2.2 in it. I installed OpenCV with homebrew and this command:

sudo brew install opencv -build32

But when I'm compiling the project with Xcode4.1 in 32bit I will get this errors:

Undefined symbols for architecture i386: "_cvLoadImage", referenced from: ...

In my Build Settings I have defined the header and library search paths.

header search paths: /usr/local/Cellar/opencv/2.2/include
                     /usr/local/Cellar/opencv/2.2/include/opencv
                     /usr/local/Cellar/opencv/2.2/include/opencv2

library search paths: /usr/local/Cellar/opencv/2.2/lib

other linker flags: -L/usr/local/Cellar/opencv/2.2/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann

But it doesn't compile successful. I hope someone can help me?

sn3ek
  • 1,929
  • 3
  • 22
  • 32
  • Try this in Terminal: `cd /usr/local/Cellar/opencv/2.2/lib; file libopencv_highgui.dylib`. What does it say? – SSteve Aug 17 '11 at 00:34
  • Instead of changing this post to say (solved) in the title, it's probably a better idea to answer your own question with the above information, then accept your answer. This actually marks the question closed and is the more proper way of saying "d'oh, I answered this myself." – templatetypedef Aug 17 '11 at 00:36
  • Okay thanks. I've changed my edit to an own answer. – sn3ek Aug 17 '11 at 08:05

1 Answers1

1

I have solved the problem with the help of the wiki article section Using the OpenCV libraries in an Xcode OS X project. Just needed to add the dylib files to my project. :-)

sn3ek
  • 1,929
  • 3
  • 22
  • 32
  • Hey, I'm glad that helped. I wrote that for Xcode 3. I'm happy to hear it works with Xcode 4 as well. – SSteve Aug 17 '11 at 15:45