qoi icon indicating copy to clipboard operation
qoi copied to clipboard

qoibench.c: compilation error on Windows: dirent is not available

Open vtorri opened this issue 2 years ago • 2 comments

dirent is not supported on Windows with Visual Studio. It has some minimal support with mingw64 but there is still this error with mingw64:

qoibench.c:502:37: error: 'struct dirent' has no member named 'd_type'
  502 |                                 file->d_type & DT_DIR &&
      |                                     ^~
qoibench.c:502:48: error: 'DT_DIR' undeclared (first use in this function); did you mean 'CB_DIR'?
  502 |                                 file->d_type & DT_DIR &&
      |                                                ^~~~~~
      |                                                CB_DIR

I can provide a cross platform PR for dirent if you want

vtorri avatar Aug 14 '23 06:08 vtorri

related is https://github.com/tronkko/dirent

matu3ba avatar Oct 18 '24 07:10 matu3ba

the code to add in qoi is not very big, just using FindFirstFile and FindNextFile, that's all. Adding a big piece of code is maybe not interesting for the author of qoi

vtorri avatar Oct 18 '24 08:10 vtorri