1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
I read the manual here https://www.gnu.org/software/libc/manual/html_node/Testing-File-Type.html This code after compilation produces this error, if I comment on the line with this error, then the error disappears
ls.c:(.text+0x2dc): undefined reference to `S_ISSOCK'
I read the manual here https://www.gnu.org/software/libc/manual/html_node/Testing-File-Type.html This code after compilation produces this error, if I comment on the line with this error, then the error disappears
Guest
#5066040
Guest
#5066046
Jack wrote: > #include <sys/stat.h> on a linker error a include do not help Peter II wrote: > on a linker error a include do not help sure it does. An undefined preprocessor symbol ends up in linker errors. The OP should have received meaningful compiler warnings much earlier already, however (which he appears to ignore but shouldn't). Markus F. wrote: > Peter II wrote: >> on a linker error a include do not help > > sure it does. > > An undefined preprocessor symbol ends up in linker errors. > > The OP should have received meaningful compiler warnings much earlier > already, however (which he appears to ignore but shouldn't). What then do Kirkina A. wrote: > What then do Ah, yes. Compile with
man 2 stat should have shown you that. Markus F. wrote: > Kirkina A. wrote: >> What then do > > Ah, yes. > > Compile with >
> > man 2 stat > > should have shown you that. man 2 stat did not show it. Now everything works and the problem is solved thanks
Guest
#5069675
Kirkina A. wrote: >> Compile with >>
>> >> man 2 stat >> >> should have shown you that. > > man 2 stat did not show it. Seems this has been moved to a separate man page lately. On my linux system, this is mentioned in man 2 stat, but the latest version of the linux man page project (http://man7.org/linux/man-pages/man2/stat.2.html) just says:
and the inode man page says:
ReplyPlease log in before posting. |