The
mkdir[
^] function is part of the ANSI C standard. It will exist on any compiler which supports this standard, including GCC, Microsoft Visual C, Intel C, PGI C, and almost all others.
Microsoft has marked this function as deprecated, as it is not 100% safe, and recomends you use
_mkdir[
^], which only works the Microsoft Visual C compiler.
This function does live in different headers on different compilers however.
You will need to use the method that Johny linked to include the correct headers on the correct compilers.
#ifdef TARGET_OS_MAC
#error I dont know where it is on MAC, probably
#include <sys/stat.h>
#elif defined(__linux__)
#include <sys/stat.h>
#elif defined(_MSC_VER)
#include <direct.h>
#define mkdir _mkdir //Automatically use the safe function on windows
#else
#error Unknown compiler, probably cygwin or something, probably in
#include <sys/stat.h>
#endif
EDIT:
Generally you would not manually create a folder (or even files) on a mobile platform. You would make use of their internal functions for databases and storing data.
There are circumstances when manually making a file or folder is acceptable, and these platforms provide methods for doing so.