Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

What does Apple Mach-O Linker error mean

I've written a c++ program in Xcode 6.3.1 and when I try to run it, it says 'build failed' and gives an Apple Mach-O Linker error. When I click on it, it says 'undefined symbols for architecture x86_64', and 'linker command failed with exit code 1 (use -v to see invocation)'. I've tried deleting the DerivedData file but that didn't do anything. Any suggestions?

MacBook Pro (Retina, 13-inch, Mid 2014), OS X Yosemite (10.10.1)

Posted on May 23, 2015 8:56 PM

Reply
8 replies

Jun 20, 2015 5:21 AM in response to Undergroundkinng

Hi Etresoft.


Can you have a look at this for my i have a similar issue.


Ld build/Debug/HandDetection normal x86_64

cd /Users/imac/Desktop/HandDetection

export MACOSX_DEPLOYMENT_TARGET=10.10

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.10.sdk -L/Users/imac/Desktop/HandDetection/build/Debug -L/Users/imac/Documents/OpenCV/opencv-3.0.0/build/lib -F/Users/imac/Desktop/HandDetection/build/Debug -F/usr/local/lib -filelist /Users/imac/Desktop/HandDetection/build/HandDetection.build/Debug/HandDetection .build/Objects-normal/x86_64/HandDetection.LinkFileList -mmacosx-version-min=10.10 -stdlib=libc++ -lopencv_highgui.3.0.0 -lopencv_core.3.0.0 -lopencv_imgproc.3.0.0 -Xlinker -dependency_info -Xlinker /Users/imac/Desktop/HandDetection/build/HandDetection.build/Debug/HandDetection .build/Objects-normal/x86_64/HandDetection_dependency_info.dat -o /Users/imac/Desktop/HandDetection/build/Debug/HandDetection


Undefined symbols for architecture x86_64:

"cv::VideoCapture::VideoCapture(int)", referenced from:

_main in main.o

"cv::VideoCapture::~VideoCapture()", 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)


I have no idea why it is doing this. I am using openCV and am trying to create a basic program. Any help would be appreciated.

openCV3.0.0 and X Code 6.3.2

What does Apple Mach-O Linker error mean

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.