XCode5 Link Testflight SDK library - linker

i want to use libTestFlight.a library in my project, i already import it in "Link Binaries With Libraries", also in build phases, i tried to add "Search Path" and "Header Path", i also tried to change the ARCH to Standard architectures (armv7, armv7s), but still no luck, it always give this error:
Undefined symbols for architecture armv7:
"_deflate", referenced from:
__tf_remote_log_compress_data in libTestFlight.a(tf_remote_log_io.o)
"_deflateInit_", referenced from:
__tf_remote_log_compress_data in libTestFlight.a(tf_remote_log_io.o)
"_deflateEnd", referenced from:
__tf_remote_log_compress_data in libTestFlight.a(tf_remote_log_io.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Add the libz.dylib as the Link Binary With Libraries.
Build Phases > Link Binary With Libraries > push the + button > search the libz.dylib and select it > push the Add button.

Related

MATLAB Generated C Code Compilation Error

I have a MATLAB function that has signal processing and machine learning and I wanted to test it on another OS like linux. So I use codegen to generate C code for that function. When I come to run it (predictActivityFromSignalBuffer) on the command line, this is what I get:
MacBook-Pro-2:predictActivityFromSignalBuffer kareem$ gcc predictActivityFromSignalBuffer.c
Undefined symbols for architecture x86_64:
"_featuresFromBuffer", referenced from:
_predictActivityFromSignalBuffer in predictActivityFromSignalBuffer-1a1886.o
"_main", referenced from:
implicit entry/start for main executable
"_mynn", referenced from:
_predictActivityFromSignalBuffer in predictActivityFromSignalBuffer-1a1886.o
"_rtIsNaN", referenced from:
_predictActivityFromSignalBuffer in predictActivityFromSignalBuffer-1a1886.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What is this error telling me exactly? I have no idea how to debug this or where to start/look.
Did you really just call
$ gcc predictActivityFromSignalBuffer.c
without any other dependencies? Usually there come a lot of other files with a code generation that have to be linked.
I do not know what you have done to produce your .c file. I recommend to use the coder wizard by typing
coder
in the Matlab command window. This will guide you through the whole process of code generation and also offers a lot of support and testing possibilities. You can also choose to compile your functions to ready-to-use DLL libraries or executatables. Just have a look at it.

Xcode C project - linker command failed

The problem is as follows.
I am trying to add two simple .obj files to my project. I have added a header file and I can see that obj is valid as Ttime structure, which is a part of obj is working. However, whenever I try to execute any function I get this error:
Undefined symbols for architecture x86_64:
"_printRES", 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)
Error Screenshot

Gstreamer first steps - "Undefined symbols..." error

Probably a noob question but I can't find an answer to this. I've downloaded and installed Gstreamer for Mac from http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-init.html
I copied the code for example 4.1, to initialize GStreamer, from
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-init.html into a file called eg41.c
and used the terminal command gcc eg41.c -I/Library/Frameworks/GStreamer.framework/Headers
. The output was:
Undefined symbols for architecture x86_64:
"_gst_init", referenced from: _main in eg41-9814a5.o
"_gst_version", referenced from: _main in eg41-9814a5.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 ideas?

Reachability Errors

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've looked over FirstViewController, reachability.h and reachability.m - It's clearly defined! And I've even added SystemConfiguration.Framework, as well as Reachability.m is in the compile list.
Any ideas? I'm losing my mind!
Pic attached.
http://i.imgur.com/uw4Zb.png
Try to remove references to Reachability.h and Reachability.m files from your xCode project. - Make sure it disappears from Compile Sources.
Search you project's folder to make sure you don't have duplicates for Reachability.h and Reachability.m files in it
Command+Shift+K to clean the project;
Add Reachability.h and Reachability.m back to the xCode project;
Hope this will help.

Apple Mach-O Link (Id) Error

My code is identical to this question I asked earlier so there's no point in duplicating it here
This is the error I am getting:
Undefined symbols for architecture x86_64:
"_stdscr", referenced from:
_screen_init in screen.o
"_werase", referenced from:
_screen_init in screen.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 had this error in the past and I feel like it has something to do with a duplicate function name or something, but I have no idea how to debug this.
EDIT:
After adding the libncurses.dylib file to my project, the errors discussed above have disappeared, but a new error has emerged when I call screen_init(); in my main.cpp:
// main.cpp
#include "screen.h"
int main(){
screen_init();
}
// new error
Undefined symbols for architecture x86_64:
"screen_init()", 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)
Pretty much the same error except now in my main. Is there another library I am missing? These errors are very mysterious and not very helpful.
I guess you need to add the library to your link phase, if you are going with XCode you should add it in project details:
choose project details
choose build phases tab
open link binary with libraries part
click the plus symbol
add libncurses.dylib to your project.

Resources