Figure 11: Building main4 under SunOS.


SunOS:sample1> gmake main4
CC -c -o main4.o main.cc
CC -c -o native_wrap.o native_wrap.cc
gcc -fPIC -c -o owncode.o owncode3.cc
gcc -shared -fPIC owncode3.o -o libowncode.so
CC main4.o native_wrap.o libowncode.so \
    -L./native_library/SunOS -lnative -o main4
SunOS:sample1>