I've been having trouble compiling my own OpenCV iOS project. I started with a simple command-line app target and I've now added an iOS app target. The problem is that my iOS target produces the following linker error:
ld: library not found for -lcv
collect2: ld returned 1 exit status
Command
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2
failed with exit code 1
I'm not sure where the flag, -lcv is coming from, as I haven't set it as any of the settings in my project's "Build Settings". I've downloaded a demo OpenCV iPhone project that compiles perfectly fine, and I've tried to copy the build settings from this project but I can't see what's different!
Thanks very much for any help.
Try adding in the project settings the path exact of the library since : /User/.....
important: only ONE ""
Related
I have getting iOS SDK(1.3.1) for KudanAR.
I tried to builded the KudanARsample in Xcode.
However, you will see an error such as the following.
ld: framework not found KudanAR
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am installed already 'KudanAR.framework'.
I wonder if the packages is missing?
Download from:
https://github.com/kudan-eu/Simple-Samples-iOS
Development environment:
Xcode 8.0,iOS 10,OS X
Please answer....
As the README instructions say:
In order for this sample project to work, you will need to download the KudanAR framework from the Kudan website. Then simply drop the framework into the root project directory and run the Xcode project.
You can get it from the Kudan website
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 ;)
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
I am trying to create ipa for any cocos2d application (even the hello world one) but i am getting this.
ld: library not found for -lz
clang: error: linker command failed with exit code 1 (use -v to see invocation)![enter image description here][1]
Add libz.dylib to "Link Binary with Libraries" Build Phase of your app's target. If that doesn't fux it try reinstalling Xcode because -lz should do this automatically.
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.