Linker error when compiling in Xcode - xcode

I am getting this error when I am compiling a program in Xcode.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyDatabase", referenced from:
objc-class-ref in Gallery_CollectionViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

You have forgotten to add the source file that implements the class MyDatabase to the Xcode target and consequently it hasn't been compiled and linked with the binary.

Related

multiple errors with my audio toolbox

i have 3 errors and one warning when trying to play sound on my app. i am fairly new to xcode.
ld: warning: ignoring file /Users/harrisschrick/Documents/Test app/AudioToolbox.framework/AudioToolbox, missing required architecture x86_64 in file /Users/harrisschrick/Documents/Test app/AudioToolbox.framework/AudioToolbox (3 slices)
Undefined symbols for architecture x86_64:
"_AudioServicesCreateSystemSoundID", referenced from:
-[humordepotViewController viewDidLoad] in humordepotViewController.o
"_AudioServicesPlaySystemSound", referenced from:
-[humordepotViewController PlayAudioButton:] in humordepotViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
any help at all would be amazing!

Xcode error - Undefined symbols for architecture x86_64:

I have this error in XCode:
Undefined symbols for architecture x86_64:
"Parser::Parser(char const*)", referenced from:
___cxx_global_var_init 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)
Very common reason is using a static library that is compiled for 32 bit only.

Xcode 5 error Undefined Symbols for Architecture i386

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TraktAPIClient", referenced from:
objc-class-ref in ViewController.o
"_kTraktAPIKey", referenced from:
-[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is the error I get when I try to compile my xcode program
You are trying to use a library "TraktAPIClient" for i386. This library does not seems to contain any compiled code for this architecture. If you are building for iOS, you should target armv7 and armv7s.

Create static library Xcode 4.6

I'm building static library in Xcode 4.6. http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/. I building follow post but wrong error.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SSHelloer", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solved
I found reason to error. I'm playing app in simulator, static libs build for device. So wrong error.

hid api building error in XCode

I'm trying to test this hid api for MAC in XCode by creating a project type "Core Foundation" just by importing the "hidapi/hidapi.h" library and replacing the "mac/main.c" files into the project. After adding the IOKit framework, and trying to build I got an error saying:
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.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've looked into this error here and on the internet, but it seems that this error it's not related to specific problem, it occurs depending on the situation. Can you give me a help?
Thank you very much.

Resources