![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Students attending this course have access to
In the Ebar the default GNU C++ compiler is gcc 2.95.3.
In the Gbar the default GNU C++ compiler is gcc 2.8.1. If you have problems with compilation of ANSI C++ programs you may change to the new gcc 2.95.2 by setting the environment variable GCC_VERSION to 2.95.2 :
setenv GCC_VERSION 2.95.2
You can enter the command above in the terminal window where you run make or put it in your tcshell setup-file .tcshrc . You can always see the version of the c++ compiler you are using by typing g++ -v .
Call of compiler:
g++ | compile and link |
g++ -c | compile, do not link |
g++ -o file | place output-file in file |
g++ -O1 g++ -O2 |
compile and optimize |
g++ -v | print version number of gcc |
All combinations of the above shown parameters may be used.
When editing C++ programs you can have highlighted syntax. If you don't have it, just use the menu Help/Options/GlobalFontLock.
When your program consist of many files use the speed-bar to easily change from one file to another and move to the source for a specific class method, Menu: Tools/DisplaySpeedbar.
If you have a makefile you can compile from inside emacs, Menu: Tools/Compile Return.
Emacs Help:
![]() | Emacs quick reference card |
![]() | Emacs quick reference card (postscript, pdf) |
![]() | Emacs manual |
![]() | CC mode |
![]() | For customization of emacs see The very unofficial dotemacs home. |
The program examples in the book: C++ for C programmers is available from addison-wesley. However, the source seems to contain bad line-shifts (13's) which the egcs-compiler does not like. The source text with correct line-shift's (10's) is available here. In the Linux-bar the source text can also be taken from the catalog
~v0283/kurser/49423/book-exs/ .
Remember, you have a full C++ Library Reference available at Dinkum C++ Library Reference
Hans Bruun (hab@imm.dtu.dk) 17-12-2001