problem with compiling .mm file - iphone-sdk-3.0

I am trying to load .mm file on my main.m iPhone project but i'v got some errors !!! I don't know how can i solve them ! these errors runs fine on the another .mm file !

That file looks fine. I'd guess the error is in the .h - probably a missing ';'

Related

Can Swift.h file be imported in pch file?

I'm trying to use swift in an Objective-C based project. It seems that ProjectName-Swift.h needs to be imported in every .m file which doesn't sound good. Can it be imported in the ProjectName-Prefix.pch like UIKit/UIKit.h so that I only need to type once in the project?
I've tried this way, but .pch cannot find the header file. Is there an alternative attempt?

I have deleted main file from my source file and i got error

In iOS 7 I have deleted my main file from my source file. I replaced it from trash and I got an error like this:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
how to overcome? Thanks for your help.
When you restored the main.m file did you add it to the bundle? Did you add it with the check mark on copy?
Check in Build Phases under Compile Sources that your main.m file is there.
Also make sure the main file isn't twice in your project.

Compiling in Xcode

I'm compiling a project that was copied from another application file by file from XCODE IDE.
After compilation I get the following error:
Error: could not read data from '/Users/heziflashner/Documents/#import <UIKit/UIKit.h>
#import "MapKit/MapKit.h"
#import "CoreLocation/UserLocationAddress/salesShare03/salesShare03/salesShare03-Info.plist':
The file “salesShare03-Info.plist” couldn’t be opened because there is no such file.
I'm trying to change the framework directory but with no success.
Any one can help?
For framework headers you must use:
#import <MapKit/MapKit.h>
The problem seems to be that you have a file making a reference to saleseShare03-Info.plist. Be sure you have that in your project tree, even try to remove it and then add it again. Else check your .xcodeproj file and check the settings. Copying a project this way is always tricky, good luck.

Add source code as a library in Xcode4

I've got some source code (.h and .m files) that being developed by someone else.
I need to add it to my project as a (static) library Or even to add it as a source files that to be used by my own source files..
When I copy and past the folder containing the .m and .h files into my project I got a link error.
How to do that?
Maybe this tutorial will help you:
Using static libraries with Xcode

error: libxml/parser.h: No such file or directory

I'm attempting to use XML (Chapter 10 in Professional iPhone and iPad Database Application Programming), and I've run into a bit of trouble.
Under Header Search Paths in Build Settings I have this path:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/libxml2/
That's all fine and well, but then:
#import <libxml/parser.h>
#import <libxml/tree.h>
error: libxml/parser.h: No such file or directory
If I flip the imports:
#import <libxml/tree.h>
#import <libxml/parser.h>
error: libxml/tree.h: No such file or directory
Weird.
For now I have this:
#import <libxml/catalog.h> // Dirty hack
#import <libxml/parser.h>
#import <libxml/tree.h>
error: libxml/catalog.h: No such file or directory
But that's no good for a production app.
Try changing your header search path to ${SDK_DIR}/usr/include/libxml2.
As it turns out, it was a trivial fix. I closed the project to work on another, and when I reopened it, the error was gone. Not exactly what I would have expected, but hey, it works now.
"When in doubt, reboot."