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)':
centt(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)):
centt(g++ -o source source.cc)
If a mere compilation is required, the compiled module can be produced using
the tt(-c) flag:
centt(g++ -c source.cc)
This generates the file tt(source.o), which can later on be linked to
other modules. As pointed out, provide the i(compiler option) i(--std=c++0x)
(note: two dashes). to activate the features of the C++0x standard.
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 be used to maintain bf(C++) programs, but good
alternatives exist, like the hi(icmake)
turl(icmake)(http://icmake.sourceforge.net/)
program maintenance utility, hi(ccbuild)
turl(ccbuild)(http://ccbuild.sourceforge.net/) or hi(lake)
turl(lake)(http://nl.logilogi.org/MetaLogi/LaKe)
It is strongly advised to start using maintenance utilities early in the study
of bf(C++).
|