2

i have a problem with xcode and dirent.h. I have to include dirent.h for my program but it says that im missing the header windef.h, i downloaded it and then it says it needs winnt.h and so on.. How do i solve this issue with and the missing headers?

Schbabako
  • 113
  • 11
  • There is no header `windef.h` or `winnt.h` used by `dirent.h` on macOS (or Mac OS X). And the `` header is installed if you install the command line tools (and should be available if you only use the IDE — though the location will be different). Use `xcode-select --install` to install the command line tools. – Jonathan Leffler Dec 13 '16 at 06:19
  • Ok i will install them. Thank you very much, i hope it works. :) – Schbabako Dec 13 '16 at 06:29
  • You may need to remove the copy of `dirent.h` that you copied from somewhere else. What works on Windows is irrelevant on Mac, and what works on Linux is not the same as what works on Mac, though the end result looks similar (and, with care, the same source code can work on all three platforms). – Jonathan Leffler Dec 13 '16 at 06:31
  • ok, but now i got another problem. I cleaned it and tried to rebuild it and i get this error message now. Apple Mach-0 Linker(ID) Error Linker command failed with exit code (use -v to see invocation) – Schbabako Dec 13 '16 at 06:39

0 Answers0