Having issue with AR on iOS 7 and Xcode 5 - ios

I developed a project with ninevehGL engine and vuforia sdk , every thing worked fine on xcode 4 , and iOS 6 , but today I compile my project and got two different strange errors :
ld: warning: directory not found for option '-L/Users/MK/Documents/Xcode project /CarShowcase/Qualcomm'
ld: library not found for -lQCAR
clang: error: linker command failed with exit code 1 (use -v to see invocation)
or
Lexical or preprocessor issue 'QCAR/Tool.h' file not found
I checked header path and everything is OK ! but is there any solution to fix these issues ?

Lover,
Go to-> Target-> Build Phases -> Link Binary with Libraries,
Here you will see, your missing libraries in red colour, indicating the libraries not found, just remove these. & add gain using "+" button -> Add Other, and then locate the libraries. Hope this will help.

Related

Xcode 7 simulator error "duplicate symbols for architecture x86_64"

My development environment with Xcode 7.2.1, CocoaPods 1.0.0 and GoogleMaps 1.13.2
I can build code successful to generate a XXX.ipa file and install in my iPhone 6 Plus to work correctly.
But when I run Xcode simulator by item "iPhone 6" or "iPhone 6 Plus" always get the information as below
"xxxx duplicate symbols for architecture x86_64" "linker command
failed with exit code 1 (use -v to see invocation)"
I use the following solutions still can't fix it
Build Options -> Enable Bitcode -> set "No"
Remove -ObjC from Other Linker Flags
project Targer -> Build phases -> compile sources, ckeck no duplicate files
Make sure I haven't #imported a .m file
I am wondering if there are any other method to solve this, help would be appreciated thanks.
This error generally occurs when you have linked any library or file twice.
In the error desciption, the name of the duplicated file will be listed, you can search and and make sure you don't have duplicates.
If you find duplicates, remove reference to one of them to play safe
I have faced similar kind of issue.
In my application I have run my code and created ipa before two day. And today when I am trying to run same code without any changes I am getting:
ld: 102 duplicate symbols for architecture x86_64 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
The solution for this duplication Linker error can be solved by Remove all of your classes from compile sources, then click the + button and search for the term '.m'. Highlight every class, then click add. Build and run again.
This problem can also be occurred in case you import ".m" file instead of ".h" by mistake. I know it may be seemed as a stupid advise but this is what I had done in my case.
I resolved this issue by removing the -all_load flag in the Build Settings-> Other Linker flags.

Chartboost with Unity 5 on xcode missing linking file

Has anybody used chatboost with unity 5 on IOS? I get a linking error and a warning
warning: directory not found for option '-L/Users/alexm/Downloads/iosFree/LibrariesPlugins/iOS'
ld: library not found for -lChartboost
clang: error: linker command failed with exit code 1 (use -v to see invocation)
On the Android everything is fine. Do I have to do anything extra other what i mentioned on chartboost integration page?
Make sure that if the Chartboost plugin is using some PostprocessBuildPlayer stuff, that is isn't getting clobbered by a different script.
If, in XCode, you check the build phases tab for linked frameworks and you don't see Chartboost.framework, it's likely the build script not running correctly.

ld: building for iOS Simulator, but linking against dylib?

I'm having a issue compiling my app for Simulator. In the device runs perfectly but once I tried it to compile in simulator I get the following error:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked before posting this question, but the answers I found in stackoverflow, like to run this,
export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xct‌oolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH
or
The problem was that Xcode 5 replaces gcc with clang and adds in a "-triple" option that specifies OSX as the target. If you pass "-miphoneos-version-min=7.0" on both gcc command lines it works. You can see the clang command line if you pass "--verbose" to gcc. It's also necessary to add to the PATH for Xcode 5 so that cmake can find the necessary tools: export PATH=/Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xct‌​oolchain/usr/bin:/Applications/Xcode5-DP6.app/Contents/Developer/usr/bin:$PATH None of this is official.. but works for me so far.
I dont really understand how to to do this. Any help, please?
Check Build Settings for your test target. This values should look similar:
If you have any escaped symbol, consider to fix it. I had here : \". I just removed them
Also notice: order is important!
P.S. from GraehamF It's always a good thing to Build -> Clean and restart Xcode, so the changes to take affect
When I faced this error with an XCode project, I open the file ???.xcodeproj (in a SubLime Text editor) and removed the below lines. The warning will no longer be there!
LIBRARY_SEARCH_PATHS = (
"\"${PROJECT_DIR}/../../../../../usr/lib\"/**",
"\"${PROJECT_DIR}/../../../../../usr/lib\"/**",
);

Cannot Archive when a library is included in my own iOS custom framework

I created my own iOS framework by following this tutorial, https://code.google.com/p/ios-static-framework/, which uses a static library template and aggregate target with a custom run script to create a framework.
At first it works fine. After including another library in the framework project creates the error when archive or build for device. I think the problem is with some wrong settings for that library. But I just don't know what to try. I have tried setting some sensible Other Linker Flags from https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ld.1.html , but no luck. Can anyone help please ;(
What steps will reproduce the problem?
Follow the tutorial, but change the Aggregate script architecture from armv6 armv7 to armv7 armv7s. Here is the part of the aggregate target script I changed. Everything else is the same.
if [[ "$SF_SDK_PLATFORM" = "iphoneos" ]]
then
SF_OTHER_PLATFORM=iphonesimulator
SF_ARCHS=i386
else
SF_OTHER_PLATFORM=iphoneos
SF_ARCHS="armv7 armv7s"
fi
Add an external library to the project, here I use libBlocksKit.a.
Build the framework, success.
In another child project. Include my built framework.
Add -ObjC in the app Target > Build Settings > Other Linker Flags
Archive and get error. Building for device (iPhone5) gives error too. But building for simulator seems to work.
What is the error?
This error, basically "ld: warning: directory not found for option ... ld: lto: could not merge in ... symbol multiply defined!".
ld: warning: directory not found for option '-L/Users/hlung/Dropbox/- Notes/stackoverflow/RealFrameworkApp/RealFrameworkApp/External/BlocksKit'
ld: lto: could not merge in /Users/hlung/Library/Developer/Xcode/DerivedData/RealFrameworkTest-evagqzwzyyolhjenkkjbvzibxppf/Build/Products/Debug-iphonesimulator/RealFrameworkTest.framework/RealFrameworkTest(NSObject+BlockObservation.o) because 'Linking globals named 'OBJC_CLASS_$_BKObserver': symbol multiply defined!', using libLTO version 'LLVM version 3.2svn, from Apple Clang 4.2 (build 425.0.28)' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I archive my child project with only one architecture (like armv7), it works. It shows this error with armv7 armv7s architectures ( $(ARCHS_STANDARD_32_BIT) ).
What version of the product are you using? On what operating system?
OS X 10.8.5, XCode 4.6.3
== Update 1 ==
Posted an issue at the tutorial's code.google.com page Update: 2 weeks no answer.
I found a set of useful suggestions from this answer. Update: Doesn't work
I have created a project so you can run and see for yourself here
Linking against a static library from within a framework can create some interesting challenges... It sounds like you may be linking to BlocksKit from both your framework and your application projects.
You should link in only one of those places. Try removing libBlocksKit.a from the Link Libraries build phase of your framework, but leave it in the other project.
You can do like this:
Click on your project (targets)
Click on Build Settings
Under Library Search Paths, delete the paths
I hope it can help you.

Linker errors building iOS app with Simperium

I'm getting linker errors when integrating Simperium into my app:
ld: duplicate symbol _OBJC_CLASS_$_DDASLLogger in
/Users/zulfi_shah/Documents/ContactsJournal-TestSimperium/SimpleList/Simperium.framework/Simperium(DDASLLogger.o) and
/Users/zulfi_shah/Library/Developer/Xcode/DerivedData/SimpleList-cxdtxuubxyczhgcyxbixtjtvzkct/Build/Intermediates/SimpleList.build/Debug-iphonesimulator/SimpleList.build/Objects-normal/i386/DDASLLogger.o
for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
The issue seems to be with DDASLLogger which is included in CocoaHTTP package. I also saw the same issue with Reachability classes before.
How do I ensure Simperium framework plays nice with other libraries in my binary?
Thanks.
We're updating the library on our end to avoid these name clashes. This should be fixed soon.
In the meantime, if you encounter this problem (with Simperium or any other library) you can remove your own versions of the conflicting library from your target. You can do this in a couple ways:
Select each corresponding file for the conflicting library, open the browser on the right, and uncheck the box next to your target name.
Select your Project, then your target, go to Build Phases | Compile Sources, and remove the source files for the conflicting library.
This is not very friendly, hence why we'll be fixing it soon.

Resources