I was happily using arc4random_uniform since iOS, and also for iOS targets of cocos2d-x.
Turns it doesn't work for Android, for some reason. Specifically, the error:
error: 'arc4random_uniform' was not declared in this scope
How can I get around this?
Worst case, at compile time I'd check if arc4random_uniform() exists, and if not, use some other method (like the old arc4random()...). But I really would like to avoid using different code bases for different targets here.
Any other suggestions?
Aucun commentaire:
Enregistrer un commentaire