to link is combining all compilation units of a project into a single executable, which is performed by a linker.
Linking takes place after compiling. An error during linking is called a link error.
There are two types of linkage:
- internal linkage: 'a name has internal linkage if it is local to its translation unit and cannot collide with an identical name defined in another unit at link time' [1]
- external linkage: 'A name has external linkage if, in a multi-file program, that name can interact with other translation units at link-time' [1]. Avoid data with external linkage at file scope [2]
Linking against a library in Qt Creator
Linking against a library in Qt Creator depends on your operating system:
- Linking against a library in Qt Creator under Ubuntu
- Linking against a library in Qt Creator under Windows
When you want to create a stand-alone application (that is: no DLL's nor LIB's, just one single executable file), you will need to do static linking.
- John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 1.1.2
- John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 2.3.1