![]() |
![]() ![]() ![]() ![]() ![]() |
Creating an Archive Library - 2
- Have our main program:
> cat > hwcgimain.c #include <stdio.h> extern void helloworld(void); main() { printf("Content-type: text/plain\n\n"); helloworld(); } > c89 -c -D_POSIX_SOURCE hwcgimain.cLink the program: > c89 -o hwcgi hwcgimain.o -L. -lhw-L switch specifies library location (. is CWD)