查了几个发现自己不能使用,提示:
error: no matching function for call to ‘mkdir’
看这篇博客发现应该加上::
http://blog.csdn.net/mathgeophysics/article/details/10200317
#include <sys/stat.h>
...
int isCreate = ::mkdir(path.c_str(),S_IRUSR | S_IWUSR | S_IXUSR | S_IRWXG | S_IRWXO);
if( !isCreate )
llvm::errs()<<"create path: "+ path + " \n";
else
llvm::errs()<<"create path failed! error code : "+ path + " \n";
```