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

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

Related

Eclipse Cpp g++ command not found (MinGW & CDT Installed)

I am very new in using Eclipse as an IDE and I am facing many problems in configuring it. I may also be asking a few problems that may already be on forum but believe me I've tried almost all that I could have. SO coming towards the problem, I made a simple Hello World program for C++ to test out my config and YES I have installed MinGW and CDT. I have also edited the path environment variable for MinGW, and I chose MinGW GCC as toolchain while creating it and still my simple HELLO WORLD is giving me the error:
/bin/sh: g++: command not found make: *** [src/TEST2.o] Error 127
I have no idea what I have missed in between and it would be very helpful if someone would help me out correctly config my Eclipse :)
PS: I don't know if changing the tool(compiler) in Tool chain editor affects the process but I tried it as well...

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.

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

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'

Stanford Engineering Everywhere CS106B C++ Libraries in XCode 4.6.2

Like many others, I'm taking the CS106B class on iTunes and, although the class is old, I am attempting to use the Stanford C++ libraries that are current. They are found here: http://www.stanford.edu/class/cs106b/.
During the Build Phase of projects, I have inserted into "Link Binary with Libraries" the files "random.h" and "libStanfordCPPlib.a". When I do this, I get the following error messages:
Check dependencies
warning: skipping file '/Users/lewis/Documents/Think Like a Programmer/CS106/VotingSimulation/../../../Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/random.h' (unexpected file type 'sourcecode.c.h' in Frameworks & Libraries build phase)
ld: warning: ignoring file /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a, file was built for archive which is not the architecture being linked (x86_64): /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a
Undefined symbols for architecture x86_64:
"randomChance(double)", 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 am using Mac OS X 10.7.5 and XCode 4.6.2. I have set the Build Settings Base SDK to OS X 10.7 for both the Project and the Target.
It appears to me that the "libStanfordCPPlib.a" file may be an archive file that I have to unarchive before I can link the implementation code for the header files. Is this what I need to do, and if so, how do I do it? Am I doing something else wrong in linking the files?
I'm a noob and I'd appreciate help from anyone who has been successful in getting the current Stanford CS106B C++ libraries to work in XCode 4.6.2.
I just ran into this problem myself after upgrading to the newest version of xcode (ver. 5.0, OSX ver. 10.8.5).
Try switching the architecture of the project to 32-bit Intel (i386). The default is "Standard Architectures 64-bit Intel (x86_64)".
I'm currently using xcode 6.4 and trying to work through the cs 106b course work, I had the same issue of not being able to run the sample files and assignment files (can be found here btw http://web.stanford.edu/class/archive/cs/cs106b/cs106b.1136/ ). After changing the Architectures for both the Project and Target to 32-bit-intel as listed above I still received errors. I had to take the additional step of changing the OSX deployment target from 10.10 to 10.8 under the Project info.
This allowed the program to build but I received a notification that i needed to install the Java Runtime Environment, and there was no consult output. Installing this did not resolve the issue. I was only able to fully execute the code after installing the Java Development Kit. I am now able to compile all files for the course.
I hope this update helps more recent attempts to access this info.
I hope you've found an answer to your problem by now, but as I was suffering from a similar problem, trying to get xcode 5.1 to compile Warmup.cpp, I thought I'd post my solution for those others trying to get xcode to work with the cs106b libraries.
After struggling with xcode 5.1.1 and 5.0.2, I downloaded xcode 4.6.3 off of the apple dev site, www.developer.apple.com, and trashed the later versions. After installing 4.6.3, I still got errors, but after switching the Architecures for the Project and for the Target, to "32-bit-Intel", as messysaurus suggests, the warmupp.cpp compiled fine. Trying this same technique with xcode 5.1.1 and 5.0.2 yielded no results.
Hope this helps anyone else running into problems.

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.