Archiving react-native project fails with `_RCTCxxBridge` error - reactjs

I tried a number of solutions I found on the web without any luck. I want to archive a react-native project but it keeps failing with this error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RCTCxxBridge", referenced from:
objc-class-ref in libReact.a(RCTBridge.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my podfile
rn_path = '../node_modules/react-native'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'BatchedBridge',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTImage',
'RCTNetwork',
'Core',
'RCTWebSocket',
]
# 'Core',
# 'CxxBridge',
# 'BatchedBridge',
# 'DevSupport',
# 'RCTActionSheet',
# 'RCTAnimation',
# 'RCTGeolocation',
# 'RCTImage',
# 'RCTLinkingIOS',
# 'RCTNetwork',
# 'RCTSettings',
# 'RCTText',
# 'RCTVibration',
# 'RCTWebSocket',
The commented libraries were the one I tried to use at first and on searching I commented it and replaced it with the one that are there.
Here is the link binary with libraries list:
react-native version : 0.58.1
xcode version : 10.2

Related

Unable to find symbols when compiling native code for android: ld: error: undefined symbol: free_minutiae

I'm trying to use this https://github.com/amdonov/mintct to compile for use in Android. I have successfully built the .jnilib/.jar file for use on a Mac, but am running into this error (and others, all very similar) when I attempt to do the same for Android:
ld: error: undefined symbol: get_minutiae
>>> referenced by mindtct.c:38 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:38)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
All of the symbols that it cannot find are defined in lfs.h which is contained in ${NBIS_DIR}/exports/include. Opening mindtct.c in Android Studio shows no errors or red squigglies - everything seems to be happy on that end of things.
I have verified that all the missing symbols are defined in lfs.h, tried putting the header directly into the mindtct dir, tried adding different directories/libs - can't figure it out. Overall I have very little experience with compiling C/C++, but I figure it has to be some peculiarity with how Android compiles this stuff, as I had very little difficulty getting it to build for Mac, even with my limited experience.
This is my current CMake file. Not sure if it makes any difference, but it is being called from the boilerplate CMake file (using include(${CMAKE_CURRENT_SOURCE_DIR}/mintct-android/CMakeLists.txt))from making an Android project that includes the NDK, as I intend to repeat this process for another library as well.
cmake_minimum_required (VERSION 3.18)
project (mindtct)
set(CMAKE_VERBOSE_MAKEFILE ON)
SET(MINDTCT_DIR ${CMAKE_SOURCE_DIR}/mintct-android)
SET(NBIS_DIR ${CMAKE_SOURCE_DIR}/NBIS_5.0)
include_directories("${NBIS_DIR}/exports/include"
"${NBIS_DIR}/mindtct/include"
"${JAVA_HOME}/include"
"${JAVA_HOME}/include/darwin"
"${MINDTCT_DIR}")
link_directories("${NBIS_DIR}/exports/lib")
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET(CMAKE_SWIG_FLAGS -package "com.bah.biometrics")
SWIG_ADD_LIBRARY(libmindtct TYPE SHARED LANGUAGE JAVA SOURCES ./mintct-android/mindtct.i ./mintct-android/mindtct.c)
SWIG_LINK_LIBRARIES(libmindtct mindtct image an2k openjp2 ihead jpegb jpegl
wsq png fet ioutil util m z)
The verbose output I'm getting is:
4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:buildCMakeDebug[x86_64]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/amanda/Repos/NativeLibTest/app/.cxx/Debug/2f6w55m5/x86_64'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/amanda/Repos/NativeLibTest/app/.cxx/Debug/2f6w55m5/x86_64
[1/6] Building CXX object CMakeFiles/nativelibtest.dir/nativelibtest.cpp.o
[2/6] Swig compile ./mintct-android/mindtct.i for java
[3/6] Linking CXX shared library /Users/amanda/Repos/NativeLibTest/app/build/intermediates/cxx/Debug/2f6w55m5/obj/x86_64/libnativelibtest.so
[4/6] Building C object CMakeFiles/libmindtct.dir/CMakeFiles/libmindtct.dir/mindtctJAVA_wrap.c.o
[5/6] Building C object CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o
[6/6] Linking C shared library /Users/amanda/Repos/NativeLibTest/app/build/intermediates/cxx/Debug/2f6w55m5/obj/x86_64/liblibmindtct.so
FAILED: /Users/amanda/Repos/NativeLibTest/app/build/intermediates/cxx/Debug/2f6w55m5/obj/x86_64/liblibmindtct.so
: && /Users/amanda/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=x86_64-none-linux-android24 --gcc-toolchain=/Users/amanda/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/amanda/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,liblibmindtct.so -o /Users/amanda/Repos/NativeLibTest/app/build/intermediates/cxx/Debug/2f6w55m5/obj/x86_64/liblibmindtct.so CMakeFiles/libmindtct.dir/CMakeFiles/libmindtct.dir/mindtctJAVA_wrap.c.o CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o -L/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/NBIS_5.0/exports/lib -lmindtct -limage -lan2k -lopenjp2 -lihead -ljpegb -ljpegl -lwsq -lpng -lfet -lioutil -lutil -lm -lz -latomic -lm && :
ld: error: undefined symbol: read_and_decode_grayscale_image
>>> referenced by mindtct.c:25 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:25)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
>>> did you mean: _read_and_decode_grayscale_image
>>> defined in: /Users/amanda/Repos/NativeLibTest/app/src/main/cpp/NBIS_5.0/exports/lib/libimage.a
ld: error: undefined symbol: lfsparms_V2
>>> referenced by mindtct.c:38 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:38)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
>>> did you mean: _lfsparms_V2
>>> defined in: /Users/amanda/Repos/NativeLibTest/app/src/main/cpp/NBIS_5.0/exports/lib/libmindtct.a
ld: error: undefined symbol: get_minutiae
>>> referenced by mindtct.c:38 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:38)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
ld: error: undefined symbol: write_minutiae_XYTQ
>>> referenced by mindtct.c:61 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:61)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
ld: error: undefined symbol: free_minutiae
>>> referenced by mindtct.c:64 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:64)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
>>> referenced by mindtct.c:69 (/Users/amanda/Repos/NativeLibTest/app/src/main/cpp/mintct-android/mindtct.c:69)
>>> CMakeFiles/libmindtct.dir/mintct-android/mindtct.c.o:(extract_xyt)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing:
/Users/amanda/Library/Android/sdk/cmake/3.18.1/bin/ninja \
-C \
/Users/amanda/Repos/NativeLibTest/app/.cxx/Debug/2f6w55m5/x86_64 \
libmindtct \
nativelibtest
from /Users/amanda/Repos/NativeLibTest/app
CMake Warning at /Users/amanda/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
An old version of CMake is being used that cannot automatically detect
compiler attributes. Compiler identification is being bypassed. Some
values may be wrong or missing. Update to CMake 3.19 or newer to use
CMake's built-in compiler identification.
Call Stack (most recent call first):
/Users/amanda/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
/Users/amanda/Repos/NativeLibTest/app/.cxx/Debug/2f6w55m5/x86_64/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
CMakeLists.txt:11 (project)

Undefined symbols linking to framework CMake

When compiling/statically linking a project of mine, I get the following error (in this case with OpenAL, I've tried other audio libraries such as PulseAudio and get similar errors):
Undefined symbols for architecture x86_64:
"_alcCaptureCloseDevice", referenced from:
_ad_close in libsphinxbase.a(ad_openal.c.o)
"_alcCaptureOpenDevice", referenced from:
_ad_open_dev in libsphinxbase.a(ad_openal.c.o)
"_alcCaptureSamples", referenced from:
_ad_read in libsphinxbase.a(ad_openal.c.o)
"_alcCaptureStart", referenced from:
_ad_start_rec in libsphinxbase.a(ad_openal.c.o)
"_alcCaptureStop", referenced from:
_ad_stop_rec in libsphinxbase.a(ad_openal.c.o)
"_alcGetIntegerv", referenced from:
_ad_read in libsphinxbase.a(ad_openal.c.o)
ld: symbol(s) not found for architecture x86_64
You can find the CMakeLists.txt in the link to the project, but I think the error lies within its dependency (despite it compiling just fine and generating a x86_64 architecture library). Here is the dependency's main CMakeLists.txt:
#
# Initial CMake and project setup
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
SET(PROJECT_NAME sphinxbase)
PROJECT(${PROJECT_NAME})
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
SET_DIRECTORY_PROPERTIES(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/build-data)
#
# Setup compiler flags
#
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE CACHE Release FORCE)
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -std=gnu11 -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -std=gnu11 -O3")
#
# Final project settings
#
configure_file("${CMAKE_SOURCE_DIR}/include/sphinx_config.h.in" "${CMAKE_SOURCE_DIR}/include/sphinx_config.h")
INCLUDE_DIRECTORIES(include)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL)
ADD_LIBRARY(${PROJECT_NAME} STATIC
$<TARGET_OBJECTS:libsphinxad>
$<TARGET_OBJECTS:fe>
$<TARGET_OBJECTS:feat>
$<TARGET_OBJECTS:lm>
$<TARGET_OBJECTS:util>
$<TARGET_OBJECTS:sphinx_adtools>
$<TARGET_OBJECTS:sphinx_cepview>
$<TARGET_OBJECTS:sphinx_fe>
$<TARGET_OBJECTS:sphinx_jsgf2fsg>
$<TARGET_OBJECTS:sphinx_lmtools>
)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS})
I'm setting ${LIBS} in the libsphinxad object folder:
include_directories(${CMAKE_SOURCE_DIR}/include/sphinxbase)
if (WIN32)
set(SOURCES ${SOURCES} ad_win32.c)
endif ()
find_package(PulseAudio)
if (PULSEAUDIO_FOUND)
set(SOURCES ${SOURCES} ad_pulse.c)
set(LIBS ${PULSEAUDIO_LIBRARIES} CACHE INTERNAL "libs")
endif()
find_package(OSS)
if (OSS_FOUND)
set(SOURCES ${SOURCES} ad_oss.c )
endif()
find_package(OpenAL)
if (OPENAL_FOUND)
set(SOURCES ${SOURCES} ad_openal.c)
set(LIBS ${OPENAL_LIBRARY} CACHE INTERNAL "libs")
include_directories(${OPENAL_INCLUDE_DIR})
endif()
find_package(ALSA)
if (ALSA_FOUND)
set(SOURCES ${SOURCES} ad_alsa.c)
set(LIBS ${ALSA_LIBRARIES} CACHE INTERNAL "libs")
endif()
add_library(libsphinxad OBJECT ${SOURCES})
As you can see, I'm linking to the OpenAL framework. Here is the path that CMake is sending into TARGET_LINK_LIBRARIES that gives the error above:
/System/Library/Frameworks/OpenAL.framework
It looks like I'm doing things correctly, so I'm somewhat confused. I've tried adding -framework flags and adding linking to other libraries such as CoreAudio and Foundation to no avail. Any suggestion?
I have gotten the project to build without error linking to the dynamic library, but for my purposes I need to link the library statically.

CMAKE no rule to make target for internal shared library

I wrote a cmake file that builds two shared library a vector3.c and a matrix4.c
The matrix4 depends on the vector3, if I run my cmake project and only build the vector3 shared library it builds just fine, when I add the matrix4 shared library I get a cmake error. No rule to make target.
The folder structure
core_math
------CMakeLists.txt
-common/
------common_structs.h
-matrix4/
------CMakeLists.txt
------matrix4/src/matrix4_scalar.c
------matrix4/headers/matrix4_scalar.h
-vector3/
-------CMakeLists.txt
-------vector3/src/vector3_scalar.c
-------vector3/headers/vector3_scalar.h
core_math/CMakeLists.txt
PROJECT(core_math)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
ADD_SUBDIRECTORY(vector3_scalar)
ADD_SUBDIRECTORY(matrix4_scalar)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $(CMAKE_BINARY_DIR)/static_lib)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY $(CMAKE_BINARY_DIR)/shared_lib)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY $(CMAKE_BINARY_DIR)/bin)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
core_math/vector3/CMakeLists.txt
PROJECT(vector3_scalar)
SET(CMAKE_MACOSX_RPATH 1)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../common)
SET(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../common/common_structs.h)
SET(SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vector3_scalar.c ${HEADER_FILES})
ADD_LIBRARY(vector3_scalar SHARED ${SRC_FILES})
core_math/matrix4_scalar/CMakeLists.txt
PROJECT(matrix4_scalar)
SET(CMAKE_MACOSX_RPATH 1)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../common
${CMAKE_CURRENT_SOURCE_DIR}/../vector3_scalar)
SET(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../common/common_structs.h
${CMAKE_CURRENT_SOURCE_DIR}/../vector3_scalar/headers/vector3_scalar.h
${CMAKE_CURRENT_SOURCE_DIR}/headers/matrix4_scalar.h)
SET(SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/matrix4_scalar.c ${HEADER_FILES})
ADD_LIBRARY(matrix4_scalar SHARED ${SRC_FILES})
TARGET_LINK_LIBRARIES(matrix4_scalar vector3_scalar)
build error
-- Build files have been written to: /Users/blubee/MATH/project/build
Scanning dependencies of target vector3_scalar
[ 25%] Building C object source/core_math/vector3_scalar/CMakeFiles/vector3_scalar.dir/sr
c/vector3_scalar.c.o
[ 50%] Linking C shared library $(CMAKE_BINARY_DIR)/lib/libvector3_scalar.dylib
[ 50%] Built target vector3_scalar
Scanning dependencies of target matrix4_scalar
[ 75%] Building C object source/core_math/matrix4_scalar/CMakeFiles/matrix4_scalar.dir/sr
c/matrix4_scalar.c.o
make[2]: *** No rule to make target `source/core_math/vector3_scalar//Users/blubee/MATH/pr
oject/build/lib/libvector3_scalar.dylib', needed by `source/core_math/matrix4_scalar//Use
rs/blubee/MATH/project/build/lib/libmatrix4_scalar.dylib'. Stop.
make[1]: *** [source/core_math/matrix4_scalar/CMakeFiles/matrix4_scalar.dir/all] Error 2
make: *** [all] Error 2
if I remove the target_link_libraries from the matrix4_scalar cmakelists.txt file then I get undefined symbols error instead.
Undefined symbols for architecture x86_64:
"_vec3_deg2rad", referenced from:
_mat4_rotate in matrix4_scalar.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [source/core_math/matrix4_scalar//Users/blubee/MATH/project/build/lib/libmatr
ix4_scalar.dylib] Error 1
make[1]: *** [source/core_math/matrix4_scalar/CMakeFiles/matrix4_scalar.dir/all] Error 2
make: *** [all] Error 2
I have done some testing with your code and could reproduce the problem.
It's related to having used $(...) brackets for variable dereferencing in the SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ...) command. I've changed $(CMAKE_BINARY_DIR) to ${CMAKE_BINARY_DIR} and everything works fine:
> cmake --build .
-- Configuring done
-- Generating done
-- Build files have been written to: build
Scanning dependencies of target vector3_scalar
[ 25%] Building C object vector3_scalar/CMakeFiles/vector3_scalar.dir/src/vector3_scalar.c.o
[ 50%] Linking C shared library ../shared_lib/libvector3_scalar.dylib
[ 50%] Built target vector3_scalar
Scanning dependencies of target matrix4_scalar
[ 75%] Building C object matrix4_scalar/CMakeFiles/matrix4_scalar.dir/src/matrix4_scalar.c.o
[100%] Linking C shared library ../shared_lib/libmatrix4_scalar.dylib
[100%] Built target matrix4_scalar
References
CMake Error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
What's the CMake syntax to set and use variables?
[CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY
Custom Directory for CMake Library Output

Mobile Backend Starter - iOS client (App Engine)

anyone got the error below when compiling the "iOS Client" from google "Mobile Backend Starter"?
Xcode 5.02, iPhone iOS 7.
duplicate symbol _kCloudBackendClientID in:
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/MessagesTableViewController.o
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/Constants.o
duplicate symbol _kCloudBackendClientSecret in:
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/MessagesTableViewController.o
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/Constants.o
duplicate symbol _kCloudBackendChainName in:
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/MessagesTableViewController.o
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/Constants.o
duplicate symbol _kCloudBackendServiceURL in:
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/MessagesTableViewController.o
/Users/paolo/Library/Developer/Xcode/DerivedData/CloudBackendIOSClient-gjhkqbarudkpudeeytxgowaihtym/Build/Intermediates/CloudBackendIOSClient.build/Debug-iphoneos/CloudBackendIOSClient.build/Objects-normal/armv7/Constants.o
ld: 7 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In file MessagesTableViewController.m
Change:
#import "Constants.m"
to:
#import "Constants.h"

XCode5 Link Testflight SDK library

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.

Resources