Programming and posix - April 2002
April 3, 2002
Solution Symposium
Page 23
hp e3000
programming
and posix
creating an nmxl shared library
• Create the NMXL shared library:
shell/iX> gcc -Wl,-b -o libhw.sl \
helloworld.o -nostdlib
• -Wl - pass parameters to linker
• -b - create an NMXL shared library
• Link with the shared library:
shell/iX> gcc -o hwcgi hwcgimain.c \
--for-linker "-ashared -L$PWD –lhw \
-nostdlib -lcxl -lgcc –lc"
• -ashared - prefer NMXLs instead of NMRLs
• -nostdlib – don't include standard NMRL libraries