Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 21
hp e3000
programming
and posix
creating an nmrl archive library - 1
Write new helloworld() function in helloworld.c:
#define _POSIX_SOURCE
#include <stdio.h>
helloworld()
{
printf("hello world\n");
}
shell/iX> gcc -c helloworld.c
-c generates an NMOBJ instead of NMPRG
Create the NMRL archive library:
shell/iX> ar -rv libhw.a helloworld.o
r - replace or add the object to the library
v - verbose