[cs631apue] HW2 - get/setprogname

Rob Hoffmann rhoffman at stevens.edu
Thu Sep 22 22:09:44 EDT 2011


Hello,

I'm having some trouble using getprogname and setprogname as per the 
style guide. When I google for the man page I see that they are in the 
stdlib.h library, so I have included it in my program. However, when I 
compile my program, I get these errors:

/tmp/ccAjJ13K.o: In function `main':
tcp.c:(.text+0x1f): undefined reference to `setprogname'
/tmp/ccAjJ13K.o: In function `usage':
tcp.c:(.text+0x7b): undefined reference to `getprogname'

Interestingly, typing "man setprogname" or "man getprogname" does not 
bring up any man page on the Linux lab machines. Do these functions even 
exist in stdlib.h in that environment?

-Rob


More information about the cs631apue mailing list