Can't archive on Xcode: CocoaPods linking error - xcode

On an iOS project, when I compile my project to run it, it works fine.
But if I archive it, it fails with the following error:
ld: file not found: /Users/xxxxx/Work/xxxxx/codes/xxxxx/DerivedData/xxxxx/Build/Intermediates/ArchiveIntermediates/xxxxx/InstallationBuildProductsLocation/Applications/libPods.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using Xcode 4.6 and iOS 5.0.

I searched for a long time and finally got something and solved the same problem for me. For anyone who still needs:
In Build Setting > Other Linker Flag:
Probably the flag is different for Debug and others.
Try to change wherever $(TARGET_BUILD_DIR) to $(BUILT_PRODUCTS_DIR).
For me, I changed $(TARGET_BUILD_DIR)/libPods.a to $(BUILT_PRODUCTS_DIR)/libPods.a, and problem solved.

Related

Xcode swift 3 cocoapods error

I am getting this error after installing a CocoaPod and I don't understand why:
Apple Mach-O Linker Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can somebody give me an answer?
My guess is that you are using the Xcode Project (.xcodeproj) that you where using before.
When you install a pod, you need to use the Xcode Workspace (.xcworkspace) that CocoaPods automatically creates for you:

Linker command failed with exit code 1 (use -v to see invocation) with Swift 3

I am working on building a Swift library and am hosting it on GitHub.
All was going fine until I added BluetoothKit to the project. I then got an Apple Mach-O Linker Error:
ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks'
ld: /Users/calebklevetertest/Library/Developer/Xcode/DerivedData/Napalm-dblvhbjdwovurocsvzrzaxzkjjyw/Build/Products/Debug-iphonesimulator/Napalm.framework/Napalm compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From reading the error it appears the issue somehow stems from the fact I am using Swift 3, but I can't figure out how to fix it.
I did convert BluetoothKit to Swift 3 when I added it.
There is one class that uses BluetoothKit and it is called NPFBluetooth.
A couple things to note are 1) Even though the class is public, the compiler gives an error of 'unresolved identifier', 2) The class does not show in the auto-complete and 3) All the other classes work fine.
I ran into the error migrating to swift3. As it turns out Xcode keeps copies of built frameworks and moving to swift3 is apparently not a cue to rebuild those (even after finding out it was built using swift2.... no let's throw a vague error instead...)
The solution is to delete the content of your 'derived data' folder.
Works for frameworks installed with Carthage and cocoapods.....
Go to your build settings and switch the target's settings to ENABLE_BITCODE = YES for now.
It's working for me ;)

CMake generate Xcode project :ld: library not found for -lQuadProgpp

My CMake project works well independently in terminal. However, when I use CMake generate Xcode project. I cannot build the project.
It says:
ld: library not found for -lQuadProgpp clang: error: linker command
failed with exit code 1 (use -v to see invocation)
Who can tell me what the problem is? And how to fix this problem?
Thanks

Configuring wxWidgets for OS X 10.10

I am trying to build a program that relies on wxWidgets to run properly. I have the latest version of Xcode installed. I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). However, in both cases, running the makefile for the main program gives the following error:
make: /Users/path to wxWidgets/wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? Or is that something I need to build separately? If it is separate, how would that be done?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read:
../configure --with-osx_cocoa --with-macosx-version-min=10.7
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
--prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
There is one error while building wxWidgets:
../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type
'wxNSAppController *'
[NSApp setDelegate:appcontroller];
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. Thank you very much in advance.
Similar question. I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/".

Adding new dropbox.framework to xcode giving error

I have tried to add dropbox framework to my xcode 4.5 but I'm getting an error as follows
ld: 14 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So I googled for it and found ,xcode 4.5 no longer supports drop box framework. So I tried to add new 1.3 version of dropbox framework but still it gives the same error.Please help me out. How to overcome this problem
First try to clean the project first and try to run it again. If not, have you looked at this: http://www.mathiastauber.com/integration-o-dropbox-in-your-ios-application/

Resources