gcc -o test test.c -Wl,-Map,test.map
gcc shellex.c ../src/csapp.c -I../include/ -lpthread
编成共享库.so
gcc -shared -fPIC -o libvector.so addvec.c multvec.c
gcc -rdynamic -O2 -o p3 dll.c -ldl
静态库动态库混合使用时要加特殊指令:
gcc -g -lstdc++ -g -WI,-dynamic -L. -lmy -WI,-static -L. -lmy -o test.exe main.cc