livingtech
livingtech

Reputation: 3660

Use of undeclared identifier 'arc4random' after Xcode 4.6 update

I just ran the Xcode 4.6 update, and now my project will not compile. I had to fix several C++ errors, but one of my C++ files is still getting this one Use of undeclared identifier 'arc4random'.

Note that arc4random() works elsewhere in the project just fine. (Even in other C++ files!)

I've tried changing it to arc4random_uniform(1), but that doesn't help.

Thanks for reading.

Upvotes: 1

Views: 1263

Answers (1)

toasted_flakes
toasted_flakes

Reputation: 2509

You need to #include <stdlib.h>.

Upvotes: 3

Related Questions