File: compilesources.yo

package info (click to toggle)
c%2B%2B-annotations 12.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,044 kB
  • sloc: cpp: 24,337; makefile: 1,517; ansic: 165; sh: 121; perl: 90
file content (26 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Generally the following command can be used to compile a bf(C++) source file
`tt(source.cc)':
        verb(        g++ source.cc)

This produces a binary program (tt(a.out) or tt(a.exe)). If the default
name is inappropriate, the name of the executable can be specified using the
tt(-o) flag (here producing the program tt(source)):
        verb(        g++ -o source source.cc)

If a mere compilation is required, the compiled module can be produced using
the tt(-c) flag:
        verb(        g++ -c source.cc)

This generates the file tt(source.o), which can later on be linked to
other modules. 

bf(C++) programs quickly become too complex to maintain `by hand'. With all
serious programming projects program maintenance tools are used. Usually the
standard ti(make) program is used to maintain bf(C++) programs, but good
alternatives exist, like  the hi(icmake)
        turl(icmake)(https://fbb-git.gitlab.io/icmake/)
    or hi(ccbuild) turl(ccbuild)(https://gitlab.com/bneijt/ccbuild/) program
maintenance utilities.

It is strongly advised to start using maintenance utilities early in the study
of bf(C++).