---------------------------- Program Development --------------------------
0001 debug the core file (bjchenxu) in Linux)
GDB <progname> <core>
<Progname>: the executable program that generates core dump due to an error.
<Core>: name of the core dump file. The default value is "core"
0002 A. Out obtained by gcc abc. C cannot be run (bjchenxu)
./A. Out
Why does the error message about 0003 C ++ compilation say cout is not defined (bjchenxu)
Add using namespace STD after the include header file;
0004 for the newly compiled GCC, the standard connection libraries used are all under/usr/local/lib. But how to add the default connection paths/usr/lib? (Except for adding-L/usr/local/lib at each compilation) (sakulagi, huhuuworm)
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib
Write ~ /. Bash_profile.
Add a simple method:
Add/usr/local/lib to/etc/lD. So. conf and run ldconfig once.
0005 install GCC under rh9 (the day that we walked together, huhuuworm)
Choose one of the three methods:
(1) Use rpm on CD for Installation
CD-1: compat-gcc-7.3-2.96.118.i386.rpm
CD-1: compat-gcc-C +++-7.3-2.96.118.i386.rpm
CD-1: libgcc-3.2.2-5.i386.rpm
CD-2: compat-gcc-g77-7.3-2.96.118.i386.rpm
CD-2: compat-gcc-java-7.3-2.96.118.i386.rpm
CD-2: compat-gcc-objc-7.3-2.96.118.i386.rpm
CD-2: gcc-3.2.2-5.i386.rpm
CD-2: gcc-C ++-3.2.2-5. i386.rpm
CD-2: gcc-g77-3.2.2-5.i386.rpm
CD-2: gcc-gnat-3.2.2-5.i386.rpm
CD-2: gcc-java-3.2.2-5.i386.rpm
CD-2: gcc-objc-3.2.2-5.i386.rpm
For example, the system prompts:
Warning: gcc-3.2.2-5.i386.rpm: V3 DSA Signature: mokey key ID db42a60e
Error: Failed dependencies:
Binutils> = 2.13.90.0.18-9 is needed by gcc-3.2.2-5
Glibc-devel> = 2.3.2-11.9 is needed by gcc-3.2.2-5...
Install the glibc-devel package first.
(2) A better way is to select "Main Menu" under X-window --> "system settings" --> "Add/delete Applications" --> install GCC in "development tools"
(3) up2date GCC can automatically solve the dependency problem
0006 why cannot shell scripts be run (god_father)
First, the script permission must be executable # chmod + X test. Sh
Second, the directory where the script is located is in the environment variable path, or you can directly execute #./test. Sh.