wud2app
wud2app copied to clipboard
compile errors on linux
Firstly, main.c: In function ‘main’: main.c:207:2: error: implicit declaration of function ‘mkdir’ [-Werror=implicit-function-declaration] mkdir(outDir);
... mkdir is part of sys/stat.h so need to include: #include <sys/stat.h>
Also, need to update the mkdir with permissions to avoid the following error: main.c: In function ‘main’: main.c:207:2: error: too few arguments to function ‘mkdir’ mkdir(outDir); ^ In file included from main.c:23:0: /usr/include/x86_64-linux-gnu/sys/stat.h:321:12: note: declared here extern int mkdir (const char *__path, __mode_t __mode)
Fix with: mkdir(outDir,S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH);
That's not just a compilation error. It actually makes wud2app work on GNU/Linux in first place (without those code changes it segfaults (in case your compiler does not break on warnings and produces a binary)).