Open Source Compilers:
C, C++ and FORTRAN come with most distributions.
Language | Info |
---|---|
ADA | GNAT - wiki GNAT/Linux |
C/C++/FORTRAN | GNU C compiler man page (gcc)
GNU C++ compiler man page (g++) gfortran man page Note: the current and newer branch of the gcc compiler is known as the egcs or "enhanced" GNU compiler |
kgcc | Kernel C compiler. This is a Red Hat hack to get the kernel to compile. The future plan is to eliminate this. |
ProPolice SSP for gcc | IBM: GCC extension for protecting applications
is a compiler extension which generates "hardened" executables which can survive
"stack smashing" attacks. ProPolice is an enhancement to GCC, and is distributed under GPL. The paper that started it all: StackGuard |
C# | Ximian: MONO (Not ready yet) |
C# | The DotGNU project (Not ready yet) |
Dart | The Dart language (Google developed language) |
Go | The GO language (Google developed language) |
Haskell | Haskell home page - An advanced, purely functional programming language |
Java | /usr/bin/jikes [jikes man page] - java source to bytecode compiler.
gcj - GNU JAVA compiler. (Part of complete Red Hat install. This creates native executable.) |
Pascal | Free Pascal Home page, documentation and download |
Cobol | TinyCobol Home Page |
LISP | CLISP interpreter, compiler and debugger CMU Common Lisp |
Octave | GNU Octave - An interactive language for numerical computation. |
Rust | Mozilla Foundation: Rust - speed, memory safety and parallelism. |
Scheme | MIT Scheme |
Swift | Swift.org - Developed by Apple and Open-Sourced. Similar to C/C++ and Objective-C. Linux packages available. |
Mumps | Mumps compiler - Basic like syntax with tree structured database. |
HBasic | HBasic - Similar to Visual Basic. Uses QT for GUI. |
Other Languages:
- For languages which compile to Java Byte Code to run in the Java JVM, see JVM Languages
- Languages which run in an interpreter, see Scripting Languages
Cross Compiling:
- Gcc cross compiling scripts - Compile for other platforms.
- Linux GCC cross compiler for Win32 target - [note on use]
Commercial Compilers:
Language | WWW | Description |
---|---|---|
Ada | Ada Core Technologies | Ada 95 GNAT open source compiler and GUI tools. (gcc backend) |
Ada | Green Hills Software | AdaMULTI 2000, ADA 95 IDE |
Ada | Aonix Software | Ada 95/83, ObjectAda |
Ada | Rational Software: Apex | Ada 95/83 development |
C++ | Intel | Intel ISO standard C++ compiler and tools (optimized) |
C++ | KAI (Kuck and Associates): Guide | OpenMP C/ C++ compiler for SMP multiprocessor systems. Has OpenSMP directives for dynamic balancing and dynamic threading |
C++ | Fujitsu C/C++ | Optimized ANSI, K and R, ISO/IEC and ATandT standard C++ compiler |
C/C++/Ch | C/C++ embedable interpreters | ISO C/C++, POSIX, GTK+, OpenGL, Motif, Sockets, CGI and scientific programming support. |
FORTRAN | Portland Group Compilers | Paralell FORTRAN, Cray extentions |
FORTRAN | Absoft ProFortran | ANSI FORTRAN 95, array bounds checking, HP/Compaq/VAX extensions |
FORTRAN | Intel | FORTRAN 95, HP/Compaq/VAX extensions. |
FORTRAN | N.A.Software | GUI debugger, IEEE math and exception handling. Lots of math libraries. |
FORTRAN | Numerical Algorithms Group (NAG) | Compiler supports 64 bit integers and High Performance FORTRAN (HPF), IEEE support. |
COBOL | Micro Focus COBOL | For IBM zSeries Linux mainframe. |
JAVA | Tower Technology: TowerJ | Compiles JAVA to native code. Will also compile JAVA byte code to native binary code. |
LISP | Franz Inc: Allegro CL | Common Lisp object-oriented development environment |
Eiffel | ISE: Eiffel | Object-oriented language and development environment |
BASIC | PureBasic | Compiler not an interpreter. Many extensions |
Also see:
- C++:
c++filt Demangle C++ symbols SWIG.org Interface compiler for wrapper routines which run from test scripts for testing "C" and "C++". Works with Perl, Python, Ruby, and Tcl and allows scripts to invoke "C" and "C++" functions, libraries, etc. ParaSoft C++ Test Static source code tester and automated unit test cases. - Parasoft C++ Test notes:
- View command line options: cpptest -h
- From directory in which Makefile resides:
[user1@prompt]$ make CC="cpptest -Zms Project-Name"
Project file: /home/user1/C++TestProj/ProjectsFiles/Project-Name.cpf
Options:- cpptest -Zcpf Project-Name.cpf -Zd off
Turning on/off dynamic analysis. (default is on)
- cpptest -Zcpf Project-Name.cpf -Zd off
- Command line: cpptest -Zcpf /home/user1/C++TestProj/ProjectsFiles/Project-Name.cpf -Zd off -Zrf Proj-Output-Test-Results.txt
- Launch GUI: c++test &
- C:
lint Where is it??? Try lclint bison GNU Project parser generator (yacc replacement) pccts Purdue Compiler-Compiler (yacc/lex combo) flex fast lexical analyzer generator cdecl
c++declEncoding/decoding utilities for C/C++ function declarations. Compose C and C++ type declarations. CScope C source code cross referencing tool cxref C source code documentation and cross referencing tool - FORTRAN:
f2c Convert Fortran 77 to C or C++ - Debuggers:
gdb [man] GNU debugger. Command driven text/console interface. [Tutorial] xxgdb [xxgdb] X window system interface to the GNU debugger DDD [man] Data Display Debugger. GUI interface for gdb and dbx. GPS GtkAda/GNAT Graphical IDE Debugger Interface KDbg KDE Desktop Graphical GDB Debugger Interface RHIDE Console mode IDE with terminal windows. For use with DJGPP and GNU compilers Insight GUI interface to gdb. Works with Source-Navigator IDE xwpe Borland C++ console mode IDE clone RogueWave TotalView [Commercial] Specialized in debugging multi-threaded software with memory leak detection. Also MPI/OpenMP debugging facilities. - Java:
kaffe Java virtual machine
For a full list of Java tools and JVMs, see the YoLinux Java Tutorial - Source Code Documentation:
dOxygen Documentation system for C++, C, Java, IDL (Corba, Microsoft, and KDE-DCOP flavors). Generates on-line documentation (in HTML) and/or an off-line reference manual (in LaTex)
See YoLinux dOxygen guide - Gnome:
glade Visual GUI builder to generate gtk C++ code or Gnome XML interface description to build Gnome GUI applications memprof Memory Profiling Tool to profile code, look for memory leaks and monitor code execution.
For more information, see the YoLinux GTK+ Tutorial - Motif/LessTiff:
uil Compile Motif scripting interface (Not my 1st choice for Motif programming) xmbind configures the virtual key bindings of LessTif - General:
make Utility to maintain groups of programs with compiling/linker directives imake Utility to generate Makefiles from a template. GNU autoconf Tool used to generate configure script. Requires GNU m4. gHex Binary Editor and Viewer beav Binary Editor and Viewer od dump files in octal and other formats. od -c will try to dump everthing as ascii. xxd make a hexdump or do the reverse strings Print the strings of printable characters found in a file. install copy files and set attributes (ginstall) m4 Macro language for builing configuration files objdump display assembler information from object files nm display symbol table from an object file readelf Displays information about ELF format object files. ar Create, modify, and extract from archives ranlib Generate index to archive ldconfig determine run-time link bindings ldd Print shared library dependencies for an executable
(i.e.: ldd `which xpdf`)GNU libtool Used to generate shared libraries. ipcs Report interprocess communication facility status for queues, shared memory, semaphores iprm Remove queues, shared memory, or semaphores - Data Base toolkit:
gdbm
(Includes dbm and ndbm compatability.)The GNU database manager. Berkeley DB Open Source embedded database system/toolkit. SQLite.org Open Source embedded database system/toolkit.
Eiffel | Cross platform code integration and design. Eiffel OO language and GUI framework. |
Visual SlickEdit | Editor, Class browser, Dynamic Tagging |
Perforce Software | Software configuration management |
Gimpel Software: FlexeLint | Check C/C++ source code and find bugs, glitches, inconsistencies. |
Parasoft: SOAtest | Verification and testing tools for web services (SOAP), load, XML, and WSDL |
Flexera: InstallAnywhere | Software installation package |
ParaSoft C/C++ Test C++Test |
C/C++ coding standards enforcement tool. Cross platform. Code analysis and editing IDE. Static analysis of source code. |
Parasoft: SOAPtest | Uses WSDL or UDDI info to generate SOAP requests/tests |
- IDE:
Eclipse.org IBM open source JAVA and C/C++ (with CDT plug-in) IDE. Included with FC4. Extensible IDE consortium - Borland, IBM, Red Hat, Rational. Lots of industry backing. (Open Source)
Also see EclipsePluginCentral.com Plugins available for Subversion SCM, XML documents, HEX, ...
Also see: YoLinux C++ DevelopmentAnjuta C, C++. Written for GTK/Gnome. Solid, simple, intuitive, bug free IDE for C/C++ development on Linux. Search/Indexing, edit, compile and debug. Almost no learning curve for those familiar with IDE's. KDevelop.org C++ KDE IDE Sun Studio C/C++, FORTRAN IDE for Linux. (Free and supported x86 versions) Source Navigator C/C++, FORTRAN, COBOL, Tcl, JAVA, asm editor, cross reference tool, class browser and IDE. wxStudio C++ cross platform IDE. Written for wxWindows cross platform GUI framework. Moonshine IDE built with Adobe AIR, for AS3/Flex Development. DiaSCE C/C++ Gnome code editor. Integrated with Glade GTK GUI builder. (no debugging) Lazarus IDE for Free Pascal (GPL'ed compiler) and class libraries which emulate Delphi. - Commercial IDE's:
Freescale: CodeWarrior Code navigation, compile and compare (cross platform), GNU C++ and JAVA Borland: C++ Builder 5 Full IDE. Cross platform desktop apps. New Planet Software: Code Medic Works with Code Crusader (strong C++) development environment and JX (X-window C++ application framework). C-Forge Project management and complete edit/compile/debug cycle support. Supports CVS, SCCS, RCS, ETAGS, C/C++ and FORTRAN, Querix 4gl and eRuby, Qt Designer, WxWindows and your wheel mouse. Viosoft: Arriba Embedded Software IDE. MS/Visual C++ like IDE for Linux. WindRiver: Workbench C, C++ or ADA. Unix or Windows Aligo: Omni Mobile Platform Mobile Java development (Cell phones/PDA's)
Also see:
- Memory Debugging:
ccmalloc ETH Zurich: C/C++, Checks for illegal memory access and leaks. Cannot detect illegal memory reads. GNU Checker Warns of using uninitialized variable or memory or unallocated memory. dbmalloc C malloc, memory, string, and bstring dmalloc C malloc, realloc, calloc, free. Memory-leak tracking, fence-post write detection, file/line number reporting. Portable replacement C libraries memory allocation routines with debugging and statistics gathering. Electric Fence malloc() debugger. Stops program on the instruction that overruns or under-runs a malloc buffer. Catches buffer overruns by using write protected pages to guard memory. Set environment variables to control behavior.
Debian install: apt-get install electric-fence
Compile: gcc -g -Wall -Wstrict-prototypes -lefence test.cfda FDA provides a toolkit for validating pointers, checking for leaks, gathering memory statistics, bounds checking... Leak Tracer C++ program for checking memory leaks. libcw Full-featured debugging support library for C++ developers. libsafe Detect and handle buffer overflow and format string vulnerabilities before the hackers do. (Middleware software, not compiled in) Valgrind MemCheck Part of the KDE Valgrind toolset. C/C++ memory supervision. Intercepts malloc/new/free/delete. Detects memory leaks, uninitialised memory, inappropriate read/write of stack and malloc'ed blocks, some pthread errors. Valgrind modifies its object as it is running to detect memory errors. Valgrind detects memory leaks by scanning memory. Valgrind HOWTO
This tool is often rated the best Open Source memory debugging tools.Memleak Part or X11R6.4 Memdebug
MemProf Red Hat GUI (Gtk/Gnome) tool for profiling and leak detection. Preloads it's own runtime library. Supports threaded and forked programs. MM Shared memory abstraction layer library. mpatrol Profile and log/trace malloc/free/new[] mpr Log malloc/free calls NJAMD Replaces malloc. Looks for overflows,underflows, writes to freed memory, leaks. C/C++, thread safe. YAMD Yet Another Malloc Debugger: C/C++ gcc w/ bounds checking GCC bounds checking compiler patch. Adds the -fbounds-checking flag to gcc. Cacheprof Profile/investigate cache effects in x86 programs.
Works with gcc compiler: cacheprof gcc -O -o myprog myprog.c. - Commercial Memory debugging tools:
Aprobe Memory and performance audits. RogueWave: TotalView Memory leak detection including threaded software. Parasoft: Insure++ Memory corruption and memory leak error detection. C/C++ Unicom: Purify Plus (was IBM/Rational) Runtime memory analysis, profiling and code coverage.
Memory corruption and memory leak error detection. C/C++ - Parasoft Insure++ Notes/Example:
Configure Insure++:
- Add to path in .bash_profile: /opt/parasoft/Insure++/bin.linux2/cpp/
- turn on graphical interface:
Add to the file /opt/parasoft/Insure++/.psrc
Insure++.inuse on
- Test with example: cd /opt/parasoft/Insure++/examples/cpp/
- Compile: insure -g -o leak leak.C
- Run: ./leak
Output from run: - Alternate memory functions:
Boem Garbage Collector A garbage collector for C and C++. Replaces malloc/new CSRI (tar download) GNU Malloc (tar download) Hoard Memory allocator for multiprocessors. Improves multithreaded program performance on multiprocessor systems. Ptmalloc (GNU C library) Malloc extended for SMP Quick Fix Malloc qf.c: Optimized for low memory use and optimal allignment. vmalloc (Part of ast) AT&T Labs
- Argo - GUI UML tool
- GraphViz - ATT Graph Visualization for graph layout. Used by dOxygen for class diagram annotation.
See YoLinux C++ dOxygen tutorial - Umbrello UML Modeller
- DIA: [DIA UML tutorial]
- DIA links/tools
- Poseidon - Written in JAVA to support all platforms including Linux. Eclipse plugin support.
- Medoosa - cpp2dia - C++ to UML
- Ameos - Native Linux UML and MDA design tool.
- BOUML - Reverse engineering.
- Topcased - model driven development
- Eclipse.org: Modeling tools (MDT): frameworks and tools for syntax development, graphical model development and model transformation (model to code).
Commercial Design Tools:
- MagicDraw
- Borland Together
- IBM/Rational Rose
- Visual-Paradigm.com: UML amd Visual Architect
Linux community edition available.
Software Requirements Management Tools:
- aNimble - Grails/web based Requirements Management tools. Based on OSRMT. [download]
- OSRMT - Desktop GUI application
- rmtoo - Text and command line based. Generates dependency graphs and requirements docs. Rmtoo text files CM'ed with source.
Change Management (CM) Versioning systems and control:
Subversion / Trac (YoLinux tutorial) | Subversion is a version control CVS replacement. [YoLinux Subversion user TUTORIAL] |
IBM/Rational: Clearcase | Commercial product. YoLinux Tutorials: |
RCS | Revision Control System. YoLinux Tutorial |
CVS | Concurrent Versions System. YoLinux Tutorial |
Bonsai/LXR/Glimpse [alt] | Web front-end CVS browsing and indexing engine for CVS |
Ximian Red Carpet | Automated Software Maintenance and Version Management |
PVCS: Version Manager | Commercial product |
BitKeeper | Commercial product |
Perforce | Commercial product |
Serena: Change management software. Source code, web content, ... | Commercial product |
Aldon Lifecycle Manager | Enterprise Software Configuration, Change Management, deployment |
SourcePuller | Bitkeeper compatable source code management client. |
GIT | Distributed source code management. Written in "C" and developed by Linus Torvalds for use with the Linux Kernel. Concept roots inspired by Bit Keeper. [Linus video speach on why he likes GIT] Also see the YoLinux Git and Trac integration tutorial |
Mercurial | Almost the same as GIT but written in Python and based on a different data management system. Supports Maven build system. |
Build:
- GNU gmake/make: GNU make is a build system based on the original UNIX "make" build system but with more features. Install RPM package: make. Typically for C/C++ but not language dependant
GNU make manual - GNU Automake: script system to generate a Makefile, typically for C/C++ projects
- cmake: generates platform dependant Makefiles
- Apache ANT: XML based build tool. Built-in support for Java
- ASDF: de facto standard build facility for Common Lisp
- Bazel: Google build tool for Android and IOS
- Buck: Facebook's build tool for C++, Go, Groovy, Haskell, Java, Lua, Python, Rust, .Net, Android and IOS
- Gradle: build tool for Groovy
Dependancy Managers:
- Apache Maven: XML based Java project dependancy, build, reporting and documentation tool. Supports plug-ins for additional support
- Composer: Dependency Manager for PHP
- Gems: Ruby package version and platform manager
- NPM: Node package manager for JavaScript to fulfill project dependancies
- scons: Python based, cross platform build system. (i.e. MS/Windows and Linux/Unix)
- SetupTools: Python tool to support Python project packaging (egg files). Includes easyinstallfor library management.
PyPI - PyPM: Active State (Python vendor) Python package manager
ALM systems integrate the software process from requirements through design, project management and task decomposition, assingment, coding, documentation, builds, testing, bug reporting all the way to requirements verification and release (or so they claim).
ALM tool (framework) License | CM SVN | CM Git | Wiki | Req | Task & Bug track | Peer review | Agile | Comments |
---|---|---|---|---|---|---|---|---|
Endeavour Java/Tomcat GNU | Y | N | Y | Y | Y | N | N | ALM layer on top of the following individual components: JamWiki, Jenkins, Sventon, Subversion and JForum. Sill acts like separate products and not yet fully integrated. Requirements support still needs work. Supports Gant chart. |
Codebeamer Java/Tomcat commercial product | Y | Y | Y | Y | Y | N | N | MS/Word document import/export for requirements. Authenticated with LDAP server. Did not get Git integration working. From Germany |
Codendi Java/Php commercial and GNU community edition | Y | Y | Y | Y | Y | N | N | Requirements and requiremnts trace. Difficult to install, if not impossible. From France |
GNU Makefile OS dependencies:
Makefiles can use defined OS variables. Cygwin sets $OS to "MS/Windows-Cygwin". This does not seem to be set for other OS's but can be set in the system profile or it can be explicitly set as in the example below.OS = $(shell uname -s) ifeq "$(OS)" "CYGWIN_NT-5.0" OS_DIR = win-i32 CC = /usr/bin/g++ CPPFLAGS = -g -mms-bitfields -mno-cygwin -mwindows LDFLAGS = -g -mms-bitfields -mno-cygwin -mwindows AR = /usr/bin/ar CP = /usr/bin/cp MKDIR = /usr/bin/mkdir RM = /usr/bin/rm ECHO = /usr/bin/echo TOUCH = /usr/bin/touch endif ifeq "$(OS)" "Linux" OS_DIR = linux-i32 CC = /usr/bin/g++ CPPFLAGS = -g LDFLAGS = -g AR = /usr/bin/ar CP = /bin/cp MKDIR = /bin/mkdir RM = /bin/rm ECHO = /bin/echo TOUCH = /bin/touch endif ifeq "$(OS)" "SunOS" OS_DIR = sun-sparc CC = /usr/local/bin/g++ CPPFLAGS = -g LDFLAGS = -g AR = /usr/ccs/bin/ar CP = /bin/cp MKDIR = /bin/mkdir RM = /bin/rm ECHO = /bin/echo TOUCH = /bin/touch endif ifeq "$(OS)" "IRIX64" # SGI OS_DIR=sgi-mips CC=/usr/bin/CC CPPFLAGS = -g -c -LANG:std -n32 -ptused LDFLAGS = -v -g -LANG:std -n32 -ptused AR = /usr/bin/ar CP = /usr/bin/cp MKDIR = /sbin/mkdir RM = /sbin/rm ECHO = /sbin/echo TOUCH = /sbin/touch endif ... help: @-$(ECHO) "make all - builds executable/library" @-$(ECHO) "make install - installs components" @-$(ECHO) "make clean - removes object files and executable/library" @-$(ECHO) "make clean_all - removes all object files, executable/library, ..." ...
Also see YoLinux C/C++ gcc/g++ cross platform tips
Note that the following test frameworks are often used for Test Driven Development (TDD) and in Contiuous Integration (CI) implementations to provide a unit test infrastructure.
Test Frameworks:- C/C++:
- CUnit
- CppUnit unit test framework (also see the YoLinux CppUnit tutorial)
- CppUnit2
- Boost
- GoogleTest - C++ Unit test framework with JUnit compatible XML output (YoLinux GoogleTest tutorial)
- GoogleMock
- Java: Note that the "Mock" frameworks provide a mockup of classes which interface with the class being tested. This is required when unit testing a class which depends on other classes for its' own operation and function.
Acceptance Test Frameworks:
- FIT
- Slim (FIT clone but coded for better integration with FitNesse)
- FitNesse (Web/Wiki front-end to FIT and Slim)
Web testing:
- iOpus: iMacros - Automate Firefox
- Selenium - Web application testing system. Firefox plug-in
- Watir - Automate web browser for web testing
Also see our Continuous Integration (CI) build server tutorials:
(Unit tests usually included with CI implementations)
Wikipedia list of unit testing frameworks
Automated Nightly/Continuous Build and reporting systems:
- Jenkins: MIT licensed, written in Java, runs in servlet container, supports CVS, Subversion, Ant, Maven, and shell scripts.
YoLinux.com: Jenkins installation and configuration - Cabie: Distributed and multiplatform build servers. (Perl, MySQL) Configured for use with Subversion, CVS or Perforce CM systems.
YoLinux.com: Cabie installation and configuration - Ansible: Tower (Red Hat) - command line and web
- BuildBot: Distributed and multi-platform build servers. (Python)
- Treeherder: (Mozilla.org project) Dashboard use with Mozilla build system
- NightWatch: Java build, JUnit test system (Perl)
- Cruise Control: Continous build system (build and test after each check-in) based on ANT, JUNIT, ... Plugins (triggers) for Subversion, Perforce and Clearcase.
Commercial:
- Atlassian: Bamboo - build, test, deploy
- Zutubi: Pulse
- Parabuild
- IBM/Rational BuildForge
- JetBrains: TeamCity - Web-based with IDE (IntelliJ IDEA, Eclipse, Microsoft Visual Studio) support.
- TRAC: Simple, web based, intuitive bug and change tracking. Has a good interface with Subversion. Click around and view a current project using TRAC.
- Tigris.org: Scarab - From the Subversion crew. Interfaces with Subversion CM revision control system. Data entry, queries, reports, notifications to interested parties, collaborative accumulation of comments, dependency tracking. Web based.
- Bugzilla - Database for bugs. Allows people to report bugs and assigns these bugs to the appropriate developers.
- GNATS - Utilities to formulate and administer a database of Problem Reports grouped by site-defined "problem categories." Organizes the large volume of email that flows between end users and software maintainers by defining a database made up of archived and indexed email messages.
- SeaPine.com: TestTrack Pro - Web based defect/bug tracker which integrates with Surround SCM, Visual SourceSafe, ClearCase, PVCS, Perforce, CVS, StarTeam, and SourceOffSite.
- IBM/Rational: ClearQuest - works with their Clearcase change management system. Commercial product. Client application and web interface.
- wxWidgets.org - GUI Toolkit to port MFC based applications to Linux
- wxDevC++: IDE for wxWidgets
- IBM: A step-by-step guide to using wxWindows
- XForms - GUI toolkit based on Xlib
- FFTW.org: Library for computing the Discrete Fourier Transform (DFT)
- PETSc - The Portable, Extensible Toolkit for Scientific Computation
- Netlib.org - collection of mathematical software, papers, and databases.
- NAG.com: Numerical Algorithms Group - Commercial software components.
- NCBI: Tools for data mining - Genetic related
- TGS.com: Many 3-D graphics development tools - Commercial
- Voice/Speach:
- Kinesix.com: Sammi - Dynamic visualizations widgets for C++ and Java
- SL.com: Sherrill and Lubinski SL-GMS - Dynamic real-time visualizations widgets for C++ and Java
Cross Platform API's:
- GTK.org [Portable GUI] / Gnome developer center - Multi-platform toolkit for creating graphical user interfaces
- Apache Portable Runtime - C
- ACE - C++
- NSPR: NetScape Portable Runtime
- Yolinux: List of Cross platform GUI frameworks
- RPM.org: Docs, Building an RPM
- setup.sh - Shell script with built-in ./configure, make and make install.
- Makeself - Self extracting shell script archive
- Snarf - Web download (http, ftp, ...) and install
- Loki: Update Tool
- Running Red Hat 7.1 (glibc 2.2.2) but compiling for Red Hat 6.2 compatability.
See RELEASE-NOTES
export LD_ASSUME_KERNEL=2.2.5
. /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
- To add libraries to be included during dynamic linking,
add the entry to the file
/etc/ld.so.conf OR add the the library path to the
environment variable LD_RUN_PATH.
Sample: /etc/ld.so.conf
/usr/X11R6/lib
Add the library path to this file and then execute the command ldconfig to configure the linker run-time bindings.
/usr/lib
...
..
/usr/lib/sane
/usr/lib/mysql
/opt/lib
You can use the "-f file-name" flag to reference another configuration file if you are developing for different environments. See man page for command ldconfig. - To include the library during execution, add the library path to the environment variable LD_LIBRARY_PATH.
(Linux/Solaris: LD_LIBRARY_PATH, SGI: LD_LIBRARYN32_PATH, AIX: LIBPATH, Mac OS X: DYLD_LIBRARY_PATH, HP-UX: SHLIB_PATH) - Direct loader to preload a specific shared library before all others: export LD_PRELOAD=/usr/lib/libXXX.so.x; exec program
Also see: - Including a library in the compile statement: gcc src-file.c -lm -lpthread
The libraries referenced in this example for inclusion during linking are the math library and the thread library. They are found in /usr/lib/libm.a and /usr/lib/libpthread.a.Note: The GNU compiler now has the command line option "-pthread" while older versions of the compiler specify the pthread library explicitly with "-lpthread". Thus now you are more likely to see gcc src-file.c -lm -pthread
- ld.so - a.out dynamic linker/loader
- Environment variable to highlight warnings, errors, etc: export CC="colorgcc"
- Linux distros and releases:
Red Hat/Fedora Kernel Glibc Libraries GCC FC 25 (2016) 4.8.6-300 glibc-2.24-3 6.2.1-2 FC 24 4.5.5-300 glibc-2.23.1-7 6.1.1-2 FC 23 4.2.3-300 glibc-2.22-3 5.1.1-4 FC 22 4.0.4-301 glibc-2.21-5 5.1.1-1 FC 4 2.6.11-1.1369 glibc-2.3.5-10 4.0.0-8 FC 3 2.6.9-1.667 glibc-2.3.3-74 3.4.2-6 FC 2 2.6.5-1 glibc-2.3.3-27 3.3.3-7/3.4.0 FC 1 2.4.22-1.2115 glibc-2.3.2-101 3.3.2-1 RH 9.0 (2003) 2.4.20-6 glibc-2.3.2-5 3.2.2 RH 8.0
glibc-2.2.93 3.2 RH 7.3 (2002) 2.4.18-3 glibc-2.2.5 2.96 RH 7.2 2.4.20-28.7 glibc-2.2.4-33 2.96-112.7.2 RH 7.1 (2001) 2.4.2-2 glibc-2.2.2-10 2.96-81 RH 6.2
glibc-2.1.3 2.91 RH 5.x (1998) 2.0.36-0.7 glibc-2.0 2.7.2.3-14 RH 4.x
libc5
Ubuntu Kernel Glibc Libraries GCC 16.04 (xenial) 4.4.0-21.37 2.23 5.3.1-1 14.04 (trusty) 3.16.0 2.19 4.8.4-2 12.04 (precise) 3.11.0 2.15 4.6.3 RHEL Kernel Glibc Libraries GCC RHEL7 (2014) 2.17-55 3.10.0-123 4.8.2-16 RHEL6 (2010) 2.6.32-279 2.12-1 4.4.6 RHEL5 (2007) 2.6.18-8 2.5-12 4.1.1-53 RHEL4 (2005) 2.6.9-5 2.3.4-2 3.4.3-9 RHEL3 (2003) 2.4.21-4 2.3.2-95.3 3.2.3-20 CENTOS Kernel Glibc Libraries GCC Centos7 2.17 3.10.0 4.8.2 Centos6 2.6.32 2.12 4.4.6 Centos5 2.6.18-8 2.5-12 4.1.1-53 Centos4 2.6.9-22 2.3.4-2.13 3.4.4-2 Centos3 2.4.21-37 2.3.2-95.37 3.2.3-53 SuSE Pro Kernel Glibc Libraries GCC 10 2.6.13-15
9.3 2.6.11 glibc-2.3.4-23 3.3.5-5 9.2 2.6.8-24 glibc-2.3.3-118 3.3.4-11 9.1 2.6.4-52 glibc-2.3.3-98 3.3.3-41 9.0
glibc-2.3.2 3.3.1 8.2
glibc-2.3.2 3.3 8.1
glibc-2.2.5 3.2 SuSE Enterprise Kernel Glibc Libraries GCC 9.0 2.6.5
- How to generate a library:
- Compile: cc -c ctest1.c ctest2.c
- Create library "ctest.a": ar -cvq ctest.a ctest1.o ctest2.o
- List files in library: ar -t ctest.a
- Using library: cc -o executable-name prog.c ctest.a
- Example files:
- ctest1.c
ctest1(int *i)
{
*i=5;
}
- ctest1.c
ctest1(int *i)
{
*i=100;
}
- prog.c
#include <stdio.h>
main()
{
int x;
ctest1(&x);
printf("Valx=%d\n",x);
}
- ctest1.c
- How to generate a shared object: (Dynamically linked object library file.)
gcc -fPIC -c *.c
Notes:
gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
- Option -fPIC: Compiler directive to output position independent code suitable for dynamic linking.
- Pass options to linker: -Wl.
In this example the options to be passed on to the linker are: "-soname libfoo.so.1". - Option -shared: Produce a shared object which can then be linked with other objects to form an executable.
- Option -o: Output of operation. In this case the name of the shared object to be output will be "libfoo.so.1.0
- Unit test: Testing/Debugging C++ classes (this also applies to C functions)
Create test main program which by default is not compiled. For debugging and test purposes have the main invoked with a compiler or makefile flag. Implementing this method allows the test program to always be available and in sync with the classes and/or functions within the file.
See example C++ (ManageNumbers.cpp) program and test case main.- Regular compile: g++ -c ManageNumbers.cpp
- Compile for test: g++ -DMAIN -c ManageNumbers.cpp
Create a target in the makefile for the unit test:
...
testModule1: module1
g++ -DMAIN -c ManageNumbers.cpp
...
Also see unit test with CppUnit, a C++ Unit test framework
- Internationalization:
- Message translation see GNU "gettext".
- If available: ./configure --with-included-gettext
- Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. (i.e. environment variable LANG=en)
- catgets:
- ./configure --with-catgets
- See man page for C function catgets
- Language codes are NOT the same as the country codes given in ISO 3166.
- See man page for C functions setlocale, charsets, unicode
- International character sets: Unicode.org
YoLinux Software Development Tutorials:
- Editors:
- Linux Text Editors
- VI / VIM - Advanced editing - tutorial, tips and tricks
- X-Emacs - Editing C++ code - Use, settings, code beautification
- GDB cheat sheet and command summary - GNU debugger
- Java Programming:
- Java JUnit tests
- Create and deploy Java WAR files
- Java XML Beans - parsing XML
- C++ Programming:
- C++ Coding standards, styles and practices - dOxygen, Hungarian notation, best practices, ...
- Tips and Best Practices for Microsoft Visual C++ users (So they don't make ugly files and mess up your project.)
- CppUnit - C++ Unit test framework
- Data Types:
- Use of structures and unions in C++ - Use of a constructor with a structure.
- C / C++ Enumerations
- ANSI/GNU C++ string class examples and tutorial
- C++ Templates - template functions, classes and inheritance
- C++ STL (Standard Template Library) - vector, list (example for Linked Lists)
- Boost ptr_list vs STL list of pointers - examples and comparison.
- STL MAP and multiMAP container class example - associative storage of key-value pairs.
- Memory:
- C / C++ Dynamic Memory Allocation - malloc/free, new/delete
- C/C++ Memory Corruption And Memory Leaks - Pitfalls
- Patterns:
- Frameworks and API:
- CORBA, OmniORB, C++ and remote services (client/server request)
- Log4cxx C++ logging API
- MySQL C programming API
- SQLite and C/C++ - Embedded database - Command line interface and C/C++ API.
- Programming web server CGI programs with C++ and the GNU CgiCC library
- GNOME GTK+ Programming Tips and Tricks - Using the GTK+ cross platform GUI API to build an interactive application.
- Threads:
- POSIX Threads - make your code run faster and more scalable.
- GNOME GDK Threads (g_threads) - Cross platform threads API.
- XML:
- XML DOM Parsing with Xerces-C (3.0.1) - (Older Xerces 2.7.0)
- XmlBeansxx: XML to to C++ object. C++ auto code generation from XSD schema.
- XML and parsing XML with Gnome libXML2
- C/C++ Libraries:
- Libraries (shared objects): static, shared and dynamically loadable
- Fork, Exec and Process Control
- Sockets programming
- Signal Handling - C signal handling callbacks and C++ signal handling class
- Mixing C/C++ and FORTRAN language subroutines
- Python Programming:
- OpenLDAP C programming SDK Man Pages, RFC's and Links
- Change Management (CM) / Continuous Integration (CI):
- Subversion:
- Subversion command summary use and scripts
- RabbitVCS: integrated SVN client for the Gnome Nautilus file browser
- Subversion Server And Trac Server Installation and Integration
(Wiki formatting) - Subversion repository transfer using svndumpfilter
- Subversion command summary use and scripts
- IBM/Rational Clearcase:
- Subversion vs Clearcase comparison - Editorial
- Git and Trac Server source code control - installation and integration.
- CVS source code control - Track and manage a set of files and their revisions. Depricated. Use Subversion.
- RCS source code control - Track and manage individual files and their revisions.
- Trac Plugins
- Trac-Agile plugin: Agilo - installation and use
- Subversion:
- Continuous Integration (CI): (build servers)
- Jenkins: distributed continuous or nightly build system - For use with Git, Subversion, CVS or Clearcase
- Cabie: distributed continuous or nightly build system - For use with Subversion, CVS or Perforce
Links:
- Tigris.org - Open Source Software engineering, issue tracking and collaberation tools
- ArgoUML - UML modeling tool
- Subversion - Version control CVS replacement
- ADAhome.com - ADA home page
- ManEdit - GUI tool for creating/editing man pages.
- Programming topics:
- Design Patterns, Pattern Languages, and Frameworks for Middleware Applications
- Secure programming HOWTO - by David A. Wheeler
- Security: