I moved the folder of a project in Xcode to another computer, and I"m having some issues. I'm using NMSSH framework, and the libz.dylib file is missing from the project, and I'm unable to locate it, since the Inspector button for it is grayed out. The file is not on my system either. Shouldn't it have been inside my project folder?
Also, I'm using MBProgressHUD, and I'm using it by dragging its Xcode project in, and setting the appropriate links. One of the libraries libMBProgressHUD.a is missing, and I can't locate that either.
Everything was working fine on my other computer, so I'm guessing there's a problem with search paths, etc? Any help would be much appreciated. The errors are as follows:
ld: warning: directory not found for option '-F/Users/ramesh/Documents/CodeDump_Temp/iOS/RasbPiController/../../.Trash'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NMSSHSession", referenced from:
objc-class-ref in UserPi.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
you can download the missing file from the link below
https://www.dropbox.com/s/au2irnctslcpjih/libz.dylib
and paste it in your iOS Simulator folder. I hope it will work .
Related
I am using cocoapods in one of my projects and after I cleaned the derived data for my project I have started seeing this error
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/Bolts'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/DownPicker'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/MBProgressHUD'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/Parse'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/SCLAlertView-Objective-C'
ld: library not found for -lBolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I open up the Debug-iphoneos from Window > Projects I do not see any folders in there now. Since this problem started cropping up after cleaning derived data I do not really know what did I do which stopped generating those folders.
This is how it looks :
This is kind of how it should look, I imagine (From a different project)
I have tried what was suggested here
Cocoapods ld: library not found for -lPods-Projectname
Cocoapods ld: library not found for -lPods-ObjectiveSugar
And a couple more things which I have tried but to no avail, I have faced my fair share of cocoapod niggles. This seems beyond me.
EDIT: I have been doing some more tests with this, I realized that my pods are not even building ! When I clear derived data for any other project, it goes ahead and builds the Pods next time I try to build the project, but not in this project. What setting can wrong ?
This is how the project looks right now :
Any help will be appreciated.
Clean up cocoa pods and install them again.
You can also use tool - https://github.com/CocoaPods/cocoapods-deintegrate
Somehow the option of Find Implicit Dependencies got turned off in the build scheme. SMH.
Hope this can help someone in the future.
I have been working on my first ResearchKit app. Since the last time I created an archive, I have included a custom library for creating JSON strings. See my previous question.
After importing the .h file in that bridging-header file, I was able to use the package.
The project was running fine in the simulator. I even did a fresh clean and build for the "Generic iOS Device", and that completed with no errors. When I went to archive the project, during the linking stage, I get this error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKLocation", referenced from:
objc-class-ref in ORKESerialization.o "_OBJC_CLASS_$_ORKConfirmTextAnswerFormat", referenced from:
objc-class-ref in ORKESerialization.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
My Xcode version is 7.1.1. I have been searching around the web for possible answers. Apparently it might have something to do with these architecture version, but I can't seen to pinpoint the problem. Any help would be appreciated. Thanks!
This sounds like a bug. Best bet is to file it on Github.
For the recent couple of days I have had this compiler error in Xcode every time I've built my project:
ld: warning: ignoring file /.../(Framework Name).framework/(Framework), missing required architecture x86_64 in file /.../(Framework Name).framework/(Framework) (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CLSNAME", referenced from:
objc-class-ref in ViewController.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 also can't run this code on the iPhone 5 simulator (i386).
The iPhone device I have is outdated and can't run iOS 8. I tried setting the build settings to iOS 7 but I get an error regarding the lack of support for dynamic libraries before iOS 8.
Things to note:
I am using 2 projects, in 2 different workspaces. (one for the library and one for the demo app. Tests of the same code with the unit tests in the library project are successful.)
I used to be able to link the demo project with the library project until I had to do some changes in the library code. After I exported the newer version this error started occurring.
In order to get the library file/folder (.framework) I used the Archive option.
Running lipo -info outputs Architectures in the fat file: lib.a armv7 arm64
I have C++ code in the library project (unlikely to be the issue)
In the library project, I am using another external library I installed with Cocoa Pods (also used to work before changes in the library code)
Solutions I tried:
Changing the Architectures and the Valid Architectures list in Build Settings.
Setting "Build Active Architecture Only" to "No" in Build Settings.
Creating a new project (both for the demo and the library)
Making the library a static library (new project, got the same warning, no error, couldn't #import the files I needed)
I only started working with iOS and Xcode a couple of months ago and I am not super-experienced with everything there yet, so please try to explain everything with as much detail as you can.
Thanks in advance to anyone trying to help :)
Did you add the framework it says is missing? Also, try to delete the Derived Data folder and then clean the project. If that does not work, then turn off Modules in build settings.
I am Developing iPad App in my app read and write csv File.
csv file read and write for using Chilkat library but I am getting this error.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CkoCsv", referenced from:
objc-class-ref in backGroundViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can resolve this problem ?
Please Help me.
thanks
Check Chilkat library info.Check with terminal
lipo -info library(drag library to here).
I think library not build for simulator.If you have the source code built it for simulator also.For further verification check with real device.
Use the Chilkat support forum by searching. I found this instantly:
This happens if you are trying to link your simulator build against
the device static lib. Chilkat provides two separate static libs for
IOS apps. One targets the actual IPhone/IPad device and the other is
for the simulator. Both libs are named "libchilkatIos.a". After
unzipping, the simulator version will be located in the "libSimulator"
directory, and the device version will be located in the "libDevice"
directory.
When building for the simulator, make sure to use the simulator lib.
When building for the device, make sure to use the device lib.
It is easy to create a single universal lib using libtool. For
information about this, see
http://www.chilkatsoft.com/chilkatIos.asp
You need to import "libchilkatIos.a" file to your project. Just right click on any class file, Add files to-> and then select "libchilkatIos.a" file from lib->i386 folder in your Chilkat directory. Now the error will go away.
When i am trying to compile my project with NMSSH framework, XCode 5 says:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NMSSHSession", referenced from: objc-class-ref in HelloWorldViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What should I do?
I ran into a similar issue myself. Here's what I did to fix it.
Open the downloaded Git repo in Finder
Open the NMSSH-iOS.xcodeproj file. NOT the NMSSH.xcodeproj!
Clean and build the project.
Follow the steps from the Github wiki page https://github.com/Lejdborg/NMSSH/wiki/Build-and-use-in-your-iOS-project
Actually, this itself is on the wiki page too. I know I opened the wrong Xcode Project and it seems like a lot of people do it accidentally. So, that's what I had to do to resolve it. Also, you'll have to build the framework for either the physical device or the emulator, depending upon what you're using and add to your project depending.
Hope this helps! Good luck!
You need to link NMSSH.framework with your project.
Open Build Phases in your project settings and add NMSSH.framework into the group Link Binary With Libraries.
Try this:
Click on the project then go to build settings and type linker flags in the search bar
Add "-ObjC" to "Other Linker Flags"