SFML community forums
Help => General => Topic started by: smartly on October 23, 2014, 05:04:55 pm
-
I compiled sfml-*.a :
cmake . -DSFML_BUILD_EXAMPLES=TRUE -DSFML_OS_IOS=TRUE
make
but, how to use it?
in my ViewController.m ?
thanks!!
-
here into code ?
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// here into code ?
}
...
-
not found ios example in dir:
SFML/examples/
-
Please edit your initial post instead of creating 3 in 5 minutes.
The use of SFML on iOS is exactly the same as on any other platform. Note that when you build SFML for iOS you must set the IOS variable to TRUE, not SFML_OS_IOS. And there's no example because there was an issue with CMake, it is not able to handle the resources correctly.
Then all you have to do is to include <SFML/Main.hpp> in the file where you have your main(). SFML will run the internal event loop and all the Objective-C stuff for you, you can focus on writing your C++ app like on any other OS.