Chen0729:

It seems that even if I include <sys/stat.h>, it stills says no matching function call to “mkdir”. I am in linux, in libtorch


This is the right header though. See an example here:
https://coliru.stacked-crooked.com/a/ace3992a9a0d474e 3
The related man page:

  
      
      linux.die.net
  
  
    

mkdir(3): make directory - Linux man page 2