Link an external library
For instance, to link a library stored in the foo/bar
folder under the libsupercool.a
file:
$ g++ -L foo/bar -l supercool
Only the library name must be passed to the
-l
flag (i.e. no "lib" prefix nor extension).
Undefined behaviors
- Calling main
- Integer overflow
- Buffer overflow
- Using uninitialized values
- Dereferencing nullptr
- Forgetting the return statement
- Naming variable starting with double underscore
- Defining function in namespace std
- Specializing non-user defined type in namespace std
- Taking the address of a std function