10.4. Software Development in a 64-bit Environment

A SUSE LINUX for AMD64 system supports the development of 32-bit applications as well as 64-bit applications. The GNU compiler usually creates 64-bit AMD64 code. The switch -m32 causes the creation of 32-bit x86 code, which then also runs on 32-bit AMD Athlon or Intel Pentium systems.

The 64-bit libraries must be used for the development of 64-bit code. The paths /lib64 and /usr/lib64 are always searched, but an option -L/usr/X11R6/lib64 needs to be added for X11 code. Some adaptation of the Makefiles is thus necessary.

GDB can be used to debug the code. While the application for 64-bit AMD64 code is called gdb, it is called gdb32 for 32-bit x86 code. The strace tool can examine 32-bit as well as 64-bit programs and the library tracer ltrace also comes in a separate 32-bit version called ltrace32.