Xcode 5 project runs on simulator 3.5 but gives linker error on device - c++

When ever i am running the code on the simulator it work fine but on device it give me following error.
ld: library not found for -lz
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i have added paypal sdk in the project , without that sdk it works on device. please suggest

try to add libz.dylib in your Target lib phase

It seems that you forget to select 'destination' while copying the sdk into your project, so delete sdk and add it again in your project and remember to select 'destination'

Related

XCode ld: library not found for -lrealsense2.2.50.0 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Iam quite new to this community. Take me as a noob in software development ( Help would be appreciated )
Iam running intel based 16 inch mac. with MacOs Monterey 12.4 version and Xcode Version 13.4.1 (13F100)
Facing a problem with Xcode for C++ development, i will attach the screen shot with this. when building it shows that library not found for ld: library not found for -lrealsense2.2.50.0 clang: error: linker command failed with exit code 1 (use -v to see invocation) it was showing the same with the libfreenect2 driver as well.
Things i tried
I tried changing the name of the driver according to the name asked and added it even though it did not work.
Tried deleting the files from the derived directories and restarting everything
Creating a new project.
Building my own binary files using the SDK from link.
and lot other stuff on google, it didnt work. but when i run a cmake build with the given examples it works amazingly fine. but not when i wanted to develope my own project using the same code.
PLEASE DIRECT ME MAY BE A COURSE TOWARDS LEARNING XCODE.. anything.
This is the code iam running
And this is the error am getting

flutter iOS build failed (ld: library not found for -lPods-Runner)

I am new to flutter. I have created small flutter app and i wanna test it on my real devices but i am unable to generate ios ipa file for testing. Please if anyone could help me with this issues then it would be good for me.thanks in advance!!
I getting this error . :
*iMac:test_app snehal$ flutter build ios
Building com.org.testApp for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 5GC7G69Y22
Starting Xcode build...
Xcode build done. 5.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
ld: library not found for -lPods-Runner
clang: error: linker command failed with exit code 1 (use -v to see invocation) Encountered error while building for device.*
In new projects, in the iOS part is necessary to adjust a few parameters, such as signing, and that you can only do in Xcode.
So, try to open the iOS project with Xcode and try to build it from there. You'll see better warning and error messages there, specially regarding signing.
You can open Xcode and locate your project ios folder, or:
cd yourproject/ios
open -a Xcode .
Then select Product > Run in the menu.

XCode 7.0.1, link failing during Archive even with BitCode = NO for AWS

I know there are a couple of other questions about this out there, but they are not solving this problem.
Pre XCODE 7.x project, upgraded to XCODE 7.0.1
Getting the following error when linking
ld: '[deleted]/ThridParty/AmazonMobileAnalytics/AWSCore.framework/AWSCore(AWSCredentialsProvider.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE),
obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Even with build settings Enable Bitcode set to NO.
This is happening during ARCHIVE, but works fine for sim builds.

ld: library not found for -lnfshared in iOS 9.0

I opened a project with new Xcode (Version 7.0) and there was some errors connected with CoreText.framework and lnfshared.dylib. All libraries with *.dylib I've changed to *.tbd. Now there is only one error in compilation:
ld: library not found for -lnfshared
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Has anybody encountered such a problem?
I had a similar problem and I solved searching the files in a different path.
Look a this link
Missing files libresolv.9.dylib and libxml2.dylib
The problem was in build setting. Deployment target was from 6.0. I've change it to 7.0 and the error disappeared

Xcode build problems

I'm getting these feedbacks for two errors I keep getting when I try to "build" (which fails):
(this project built & ran fine before I upgraded my IOS device to 5.1 -- I can't even use the simulator either)
1st error:
"_OBJC_CLASS_$_CLLocationManager", referenced from:
objc-class-ref in BTInclinometerViewController.o
ld: symbol(s) not found for architecture i386
2nd error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What I don't understand is:
-- What does Xcode mean by the term "symbol";
-- How do I go about Identifying and then satisfying the missing symbol;
-- How do I "(use -v to see invocation)"
I'm using a MAC OSX 10.7.3 and Xcode version 4.3.2
Any help would be greatly appreciated on this.
Make sure you include the Core Location framework in your project. Go to you Project, Build Phases, Link Binary with Library. Then add the framework.
If you have, make sure you include the right headers in your class.