WhirlyGlobe : Getting compilation error while trying to use framework - iphone

I am trying to use the open source app WhirlyGlobe from link: http://code.google.com/p/whirlyglobe/
I am using following steps to use it in my app:
adding framework to application framework.
Copying the supporting files to my project (Utilities folder from whirlyglobe code) and setting Header Search Path as utilities/boost_1_45_0 & utilities/eigen-eigen-3.0.1
renaming my file to .mm and then trying to draw the map.
Problem here is i am getting compilation error :"'set' file not found".
This file is present under 'Utilities' folder. I am not getting what wrong i am doing. I even tried changing header paths but didn't helped.
If anybody have used this library , please help me out telling correct steps.
Thanks,
Amit

Change the extension of your file from .m to .mm

Related

Cannot access folder path header file in solution

I imported one project to another project by following this link tutorial
successfully build that two project. But when I added
#import <SampleSubproject/SampleSubproject.h> this to my main ViewController.m file error be occur.
Error : "SampleSubproject/SampleSubproject.h" file is not found.
Why is that error occurred ??
Is there any error ?
Please help me guys!
You have Headers search path settings at project configuration. Let's say there're directories A and B. With "SampleSubproject/SampleSubproject.h" Xcode looks for SampleSubproject.h at A/SampleSubproject/SampleSubproject.h and B/SampleSubproject/SampleSubproject.h. If there's a checked recursive flag for any directories, the search is performed at this directories and their subdirectories.
Now you'll need to check what is the headers search path for the target you are building keeping in mind that you might have several targets and the file with the import might not be included into all the targets.
As you also have a red library, you'll want to check the Libraries search path as well, it works in the same way.

SDWebImage building for archive (distribution)?

I am using the SDWebImage open source project for loading images asynchronously.
I can build & run for the simulator as well as for my local device.
However, when i try to build for distribution (i.e. Archive), the compiler doesn't seem to understand what the header file is:
import "UIImageView+WebCache.h" (no such file or directory).
I pretty much followed the instructions, with relative ease, described here on
github.com/rs/SDWebImage.
I knew things were going way too smoothily/easily to be true.
Oddly, i've never really faced an issue that is exclusive to Archiving.
Anybody tried Archiving with SDWebImage before?
* Updated *
I updated based on comment below. Now i am getting the following error while Archive building:
arm-apple-darwin10-llvm-gcc-4.2:
Poll/BuildProductsPath/Release-iphoneos/libSDWebImage.a: No such file
or directory Command
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2
failed with exit code 1
The strange thing is that i have the sdwebimage.a file in my project (there's actually 2, one that i copied and included, and the 2nd one from the SDWEbImage project itself).
* Update 2 *
Upon further investigation, my SDWebImage project is NOT getting built when i Archive (the .a file is red). But any other build type works fine. I looked everywhere and it seems like the SDWebImage project has the distribution configurations. Not sure what else could be the issue here.
You can keep your setup as you have it. All that is needed is to add the header files to the search path. To add the needed header files to the search path do the following.
Select your project file
Select your target
Select Build settings
In the search box enter 'header search paths'
For the Release add "$(SOURCE_ROOT)/SDWebImage" (thats
with quotes).
This works when importing like this #import <SDWebImage/UIImageView+WebCache.h>
So, I have and may others had had this same problem. I worked on it for awhile this morning and found all the suggestions are not working.
How I got it to work is to add the Workspace lib to your project, as it stated in the instructions. Make sure the file isn't red, I had to play around removing it and adding the header search path again.
Finally, I was able to see the libSDWebImage.a file.
Right click on that file and "Show in Finder"
Move libSDWebImage.a and SDWebImage/.h files to a directory you will not delete
Add the libSDWebImage.a and SDWebImage/.h files to you project
You can archive now.
Hope it works for you.
I tried all of the above methods of adding header paths.. nothing worked. I'm able to build the project fine in debug but not archive. I just tried something simple and it did work.
The file "UIImageView+WebCache.h" is part of the subproject SDWebImage.xcodeproj.. In my main workspace project I simply did "Add File" and found the "UIImageView+WebCache.h" on disk and added it to my main project. Now that file is part of my main project. Ran Archive and it worked.. I little dumb, but it worked at least
I solved it very easily by adding (with quotes):
"$(SRCROOT)/SDWebImage"
to the various Header Search Paths under my project's Build Settings. Thanks to Lizard in SDWebImage/UIImageView+WebCache.h file not found for his solution.
For me this one worked, when addded to Header Search Paths (it is exact path to the SDWebImage project)
"$(PROJECT_DIR)/ProjectName/Libraries/SDWebImage"

Compilation Error on #include <algorithm> Algorithm:No such file or Directory

I want to use OpenCV and Open SURF libraries in one project along with ARToolKitPluas then it gives me error "Algorithm:No such file or Directory" which i tried my best to fix but can't. Please Help me. Really i am in trouble and need your help.
Thanks
Your source file is probably being compiled as ObjC or C. It should be C++ (.cpp) or ObjC++ (.mm).
My Problem Solved by setting the following
#import <opencv/cv.h> in .pch file
Providing path for includes in Header search path
Providing path for libraries in Library search path
Also changing class name to .mm
writing this -lstdc++ -lz in Other linker flags
And most important issue that i observed is that the project folder name should not contain space for example if project folder name is AR Camera then change it to ARCamera otherwise it will give errors
May be you have not added Application.mk file in your project.

Info.plist file "no such file" error

I have tried to move the files in my project folder to a different folder and everything went ok, except that Xcode cannot find my Info.plist file now. This is the error I get.
could not read data from '/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist': The file “MyApp-Info.plist” couldn’t be opened because there is no such file.
The actual files location is
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'
I have checked the build settings for the project and they read
MyApp/MyApp-Info.plist
I have tried deleting the build folder and cleaning the project, but I always get this same error. I appreciate any help you can offer
Remove MyApp/ portion from build settings. plist file usually is located in the same folder ad project. You can always open project file in vi and edit it manually.
It is just a guess but it seems like one trailing /MyApp is too much in the location you are wanting to read from:
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist'
As opposed to the actual location:
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'
It would make sense to check out the URL / PATH variable you want to read from.
I had the same problem after trying to duplicate and rename a project.
In Build Settings, I had to fix two paths before I finally got it compiling successfully:
Under Packaging, Info.plist
Under Apple LLVM 5.0 - Language, Prefix.pch

Facebook Connect in Iphone header include path

I am trying to compile facebook library for my iphone application. But I am getting this error.
error: FBConnect/FBConnect.h: No such file or directory
I have added the location of the folder in header search paths and yet it is not compiling.
This is the path that I have added-
/Users/nishant/Downloads/facebook-facebook-iphone-sdk-1059eb6/src.
I even tried the copy files to destination folder option, but that also did not work.
I know this is a very simple step, but I am getting frustrated, because I have tried this like 20-30 times.
Any help.
There’s a User Header Search Path between the Build settings for your target. Set it to the root directory of the Facebook library code and it should build fine. (I have spent a while with the setting myself.)
You can check if the file is added to you current target - just expand 'Compile Sources' section in your target and see if the file is there.
I too tried this for some time and finally imported the below line
import "FBConnect.h"
instead of #import "FBConnect/FBConnect.h"
voila! it worked like a charm.