Skip to content

Can't compile the program #174

@NoobJsPerson

Description

@NoobJsPerson

when i run make i get this error

gcc -g -Wall -Wextra -Werror -I./include -c src/main.c -o obj/main.o
gcc -g -Wall -Wextra -Werror -I./include -c src/files.c -o obj/files.o
src/files.c: In function 'load_files':
src/files.c:155:22: error: implicit declaration of function 'scandir'; did you mean 'srand'? [-Werror=implicit-function-declaration]
  155 |     int ex_dirs_ct = scandir(DIR_PATH, &nmlist, NULL, alphasort);
      |                      ^~~~~~~
      |                      srand
src/files.c:167:27: error: 'struct dirent' has no member named 'd_type'
  167 |         int file_type = de->d_type;
      |                           ^~
src/files.c:194:32: error: 'struct dirent' has no member named 'd_type'
  194 |             int file_type = nde->d_type;
      |                                ^~
cc1.exe: all warnings being treated as errors
make: *** [makefile:19: obj/files.o] Error 1

btw I am on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions