libxml/xmlversion.h file not found - ios

I am using Xcode 5.0.1.
I have "libxml2.dylib" under the following path.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib
This path is set in my project HEADER SEARCH PATHS.
I have included this libxml2.dylib library in Xcode project.
When I build xcode project, it is throwing error as
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/libxml2/libxml/tree.h:17:10: 'libxml/xmlversion.h' file not found
I also tried setting /usr/include/libxml2 but in this case it is showing linker error as library not found for -lxml2
It may be a repeating question, but my issue is strange, whatever the solution is mentioned in internet, nothing works.
Could someone advise me to fix this ?

Related

xcode simultor - library not found for

I'm trying to run my ios project on the simulator but I'm told that:
ld: library not found for -lPods-.....
This is not happening if I run it on my device.
I tried looking into the search paths in my Pods project, but I didn't see anything suspicious... Maybe i'm not looking for the right thing.
Can anyone help me by telling me what should I look for?
Thanks
Ok,
I went to the Pods project file and saw that "Build Active Architecture Only" is set to Yes on debug but set to No on release... I just set it to No on both and it works...
That means that there is no libPods-....dylib in the library search path that you passed to the linker. I can't be more specific because you omitted the rest of the library name in your question. You should make sure that your library search paths are correctly pointing to where you have the iOS Simulator version of your library.

Xcode project/app name with spaces issue - framework not found

Is it possible that Xcode 6.1 doesn't finds my previously imported frameworks because of my 3 word app name? I'm using Parse and never ever had any problems with it. But actually when I open my project in Xcode I got an error that the framework doesn't found, which is absurd because it worked well earlier and I don't removed it. However if I delete the frameworks and add them again everything is fine. Am I doing something wrong or is it an Xcode bug?
ld: warning: directory not found for option '-F/Users/donip/Documents/Fl Travel Guide/Fl'
ld: warning: directory not found for option '-FTravel'
ld: warning: directory not found for option '-FGuide'
ld: framework not found ParseFacebookUtils
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Simply enclose your framework path in double quotes(""). For example:
"$(SRCROOT)/my framework/path"
"directory not found for option '-F/..."
Here '-F/..' shows it's a Framework Error. There could be 2 reasons for this.
Missing escape "\" character.
It seems search paths are broken up on several lines in the Framework Search Path or Library Search Paths. Or having spaces in path. Add the escape "\" character to fix it.
Click on your project (targets)->
Click on Build Settings->
Under Frameworks Search Paths, delete the paths.
I'm sure this is Xcode bug. Since a lot of other developers have problems with
frameworks paths, such as Absolute path issues
I'm sure You will find other issues too in SO.
I have encountered this issues myself too.
Best solution for me just commit working project files, and then
reset/revert new/wrong changes which done by Xcode.
For me, I had to delete (using Terminal):
/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/PROJECT_NAME
Using:
rm -r PROJECT_NAME-xxxxxxxx
If you have multiple projects with the same name in the /DerivedData folder, first try deleting all but the most recent one. If that does not work, try deleting all projects including the most recent.
Just update your library location to such a path which doesn't have any spaces inbetween. For example, instead of :
'-F/Users/donip/Documents/Fl Travel Guide/Fl'
use
'-F/Users/donip/Documents/FlTravelGuide/Fl'
Just change the folder name, available in that path, then make the same change in project settings in Library Search Paths and Header Search Paths, wherever its been referred.
Hope this will resolve your query.

library not found for -lxml2

I had a 'libxml/xmlversion.h' file not found build error in my iOS Xcode 5.x based project.
Then when i searched in net, I found i need to give the header search path like below.
/usr/include/libxml2
After giving this path, I am getting following Apple Mach-O linker error,
library not found for -lxml2
In the header search path, I found I have given the following path also,
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libxml2
I have libxml2.dylib in the link binary section.
Could someone help how to solve this issue and make the build successfully?
i think the path should look like this
$SDKROOT/usr/include/libxml2
that should resolve the problem. $SDKROOT is the key to the right path.
edit:
sample project:
and project explanation

mach-o linker error when trying to use ASIHTTP

I'm trying to use ASIHTTP in my app.
I had some probelms importing and linking everything right, but I found all the answers here except one.
I get a "Apple mach-o linker error" for many items, all referenced from a ASIWebPageRequest class methods in a file called "ASIWebPageRequest.o".
I don't really know where to find this file and how to fix this issue,
Anyone has a clue?
Thanks,
Yonathan
Edit - Fixed it by adding libxml2.dylib to my project, for some reason it is not included in http://allseeing-i.com/ASIHTTPRequest/Setup-instructions. I just compared the frameworks included in ASIHTTPRequest demo projects to mine and found out it was missing.
Fixed it by adding libxml2.dylib to my project, for some reason it is not included in http://allseeing-i.com/ASIHTTPRequest/Setup-instructions. I just compared the frameworks included in ASIHTTPRequest demo projects to mine and found out it was missing.

linker command failed with exit code 1(use -v)

In my app, I am getting the following Linker Error.
Previously, I made the project in XCODE 4.6 & Works perfectly in it
But When I try to run the project in XCODE 5, I am facing following error
I search a lot but could not able to find any good solution.
My external Framwork are twitter and urabanAirship
so i have done setting in my project target>build settings> search paths >Header search path.
Is that any wrong with this setting.
I also applied the same setting in Library Search path but no luck.
Help me to solve this.
Thanks in advance.
I think your architecture is "armv7, armv7s". change to "armv7" only in Build Settings,

Resources