Ready to write a C file
1, ws.h "header file, declare function name, not implemented"
2, wso.c "contains function body, implement function, need to compile into dynamic link library"
3, ws.h "main program execution document"
New Makefile File
Toucu Makefile Establish makefile file
VI Makefile Editor makefile,
Code to write make command in makefile
NEWWS:WS.C libme.so
Gcc-l./L Me ws.c-o newws
Libme.so:ws.c
gcc-shared Wso.c-o libme.so
Install
CP./libme.so/lib64
Ldconfig
Command resolution: 1, Makefile format the resulting file Newws dependent on Shenyi.c libme.so 2, gcc build compile File command-L./current directory-l MEWSO.C generate final NEWWS 3, libme.so dependent on W S.C 4, build the compiled file. So command (WS.C into libme.so) 5, make install installation
5.1, copy the compiled files into the core library
5.2. Update cache