[cs631apue] Persisting issues with strmode(3)

hao wu hwu9 at stevens.edu
Sun Oct 13 14:46:01 EDT 2013


please add -lbsd at the end of gcc command

for example:
gcc ............................ -lbsd


On Sun, Oct 13, 2013 at 1:32 PM, Jordan Scales <jscales at stevens.edu> wrote:

> Hi,
>
> I'm unable to find the original email in my inbox, but I am still having
> difficulties with strmode(3) on the linux lab.
>
> jscales at gump:~/School/2013f/cs631/ls/jscales$ head ls.h
> #include <fts.h>
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <stdlib.h>
> #include <string.h>
> #include <unistd.h>
> #include <bsd/string.h>
>
>  #define SORT_MTIME 1
> jscales at gump:~/School/2013f/cs631/ls/jscales$ make
> gcc -Wall -lbsd compare.c storage.c options.c main.c
> /tmp/ccLESyTm.o: In function `annotation_flag':
> main.c:(.text+0x487): undefined reference to `strmode'
> collect2: ld returned 1 exit status
> make: *** [all] Error 1
> jscales at gump:~/School/2013f/cs631/ls/jscales$
>
> I am linking the bsd library, but an ld error still pops up. Any ideas?
>
> Jordan
>
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131013/91ba4e09/attachment.html>


More information about the cs631apue mailing list