110 likes | 222 Views
Application Development Functions and Tools. Preparing Source Files. A.c. B.c. B.h. Editor. Text editors (e.g., Notepad) “syntax aware” editors (e.g., emacs) “syntax directed” editors (e.g., VisualStudio). Compiling. $> gcc A.c B.c –o myApp.exe. A.c. B.c. B.h. “gcc”. Preprocessor.
E N D
Preparing Source Files A.c B.c B.h Editor • Text editors (e.g., Notepad) • “syntax aware” editors (e.g., emacs) • “syntax directed” editors (e.g., VisualStudio)
Compiling $> gcc A.c B.c –o myApp.exe A.c B.c B.h “gcc” Preprocessor Compile Link • Symbolic constants: #define MAXLEN 256 • .h file control: #ifndef B_H • Conditional compilation: #ifdef _DEBUG • “Other”: #define IS_DYNAMIC(x) ….
Compiling $> gcc A.c B.c –o myApp.exe A.c B.c B.h “gcc” Preprocessor Compile Link
printf() scan() Compiling $> gcc A.c B.c –o myApp.exe A.c B.c B.h “gcc” Preprocessor Compile Link myApp.exe
Compiling /lib/libc.a $> gcc A.c B.c –o myApp.exe printf() scan() A.c B.c B.h “gcc” Preprocessor Compile Link myApp.exe
Compiling $> gcc –c A.c B.c $> gcc A.o B.o –o myApp.exe /lib/libc.a A.c B.c B.h printf() scan() Preprocessor Compile A.o Link myApp.exe B.o
Build: make $> make A.c B.c B.h make Makefile myApp.exe gcc –c A.c gcc –c B.c gcc A.o B.o –o myApp.exe
A.c B.c B.h Repository(Another directory) Makefile Test data Development Process / Tools The “Project” Tools Editor A.c B.c B.h WorkingDirectory cpp/gcc Makefile Test data Make checkin checkout Source Control
RCS myProj/ • ci file • ci –u file • ci –l file • co file • co –l file • rcsdiff file • rlog file A.c B.c B.h Makefile Test data RCS/ A.c B.c B.h Makefile Test data
A.c B.c B.h Makefile Test data A.c B.c B.h Makefile Test data Team Development Using RCS myProj/ hisProj/ A.c B.c B.h Makefile Test data RCS/ RCS/ (mkdir RCS) (ln –s ~tom/myProj/RCS RCS)