简体   繁体   中英

Issues with installing OpenCV on MAC Yosemite 10.10.2

I am trying to install OpenCV on my Macbook and I tried following this link:

http://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/

However when I try to run a sample code: I get the following error:

g++ -ggdb pkg-config --cflags --libs opencv ld: library not found for -lcrt1.10.5.o

I looked up a few things online and I arrived at the conclusion that there was a problem with my xcode.

https://software.intel.com/en-us/articles/installing-intel-compilers-for-os-x-pre-requisite-xcode-command-line-tools

However, When I tried to install the required software I got an error saying >>source /opt/intel/bin/iccvars.sh intel64 -bash: /opt/intel/bin/iccvars.sh: No such file or directory

I would really appreciate any recommendations.

I have OpenCV in my mac with yosemite and compiles on xcode command line tools.

I followed the following step

  1. Download the latest version of OpenCV binaries from the repository.
  2. Please install MacPort (from here) on which the OpenCV will be installed.
  3. Install CMAKE on your mac.
  4. cd to your OpenCV folder and create a new directory (eg. on terminal mkdir build) and cd build, that is move to build folder. (I recommend you to use terminal)
  5. On terminal type cmake .. (with is dots)
  6. Next, type: make -j8

  7. type: make install

Now OpenCV is installed in your system.

  1. Next open Xcode with Command line tool installed.

  2. Create a new C++ project

  3. On your Left side plane, where the list of folder content is shown (I dont know the name) but where you will see the file main.cpp. Here right click and create a new group and name it OpenCV Frameworks. Next Right Click on this Group and select Add files and a new dialogue box will appear. Please navigate to your installation file and add all the opencv libraries to this group. you will find it either on /usr/local/lib/ or /opt/local/lib . The libaries has name like libopencvxxx.dylib.. (I Kind of forgot but something with that name)

  4. Next go and add your header and lib path to the compiler.

Thats it.

Please try and if you still cant compile than I will add photo shoots of each step.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM