samedi 27 juin 2015

OpenCV 3.0.0 with Xcode 6.3

I'm trying to compile a simple opencv code using Xcode but I'm getting a compilation error.

The opencv version is 3.0.0 and Xcode version is 6.3 (OS X 10.10.3)

In Xcode, Apple LLVM 6.1 Language C++ settings are:

c++ Language Dialect : C++11[-std=c++11]

c++ Standard Library : libc++

the error is:

Undefined symbols for architecture x86_64: "cv::imread(cv::String const&, int)", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

When I change the c++ standard library to libstdc++, then the error was:

/usr/local/include/opencv2/hal/defs.h:271:14: 'cstdint' file not found

Can someone show me how to get opencv work with Xcode? I've already followed lot of forums and guides but still getting the same error.

Aucun commentaire:

Enregistrer un commentaire