Programming & Systems Guides
Empirical benchmarks and systems guides appear first, followed by the compiler and error-code reference archive. Browse by topic, jump to the error reference archive, or subscribe via RSS.
-
Fix Go "assignment to entry in nil map" Panic — Declared Maps, Struct Fields, and Nested Maps Go · Error Reference
Go compiles a program that assigns to a nil map without a word of complaint and then panics at run time with assignment to entry in nil map, because a map...
-
Fix Go "fatal error: all goroutines are asleep - deadlock!" — Unbuffered Channels, Nil Channels, select, and Unclosed Ranges Go · Error Reference
Go compiles a program whose only goroutine blocks forever on a channel operation and then the runtime kills it with fatal error: all goroutines are asleep...
-
Fix C++ "Use of Deleted Function" — Copying a unique_ptr Holder, Deleted Copies, and Deleted Overloads C++ · Error Reference
GCC stops the build with 'use of deleted function' when a copy, a call, or an overload lands on a function the program must not use. This guide...
-
Fix C++ shared_ptr Cycle Leak — Two Objects Keep Each Other Alive, weak_ptr Breaks the Cycle C++ · Error Reference
Two objects that hold std::shared_ptr to each other never get destroyed: each count stays at 1 after every outside pointer is gone, no destructor runs, and...
-
Fix C++ Deadlock with std::scoped_lock — Two Mutexes, Opposite Order, One Hang C++ · Error Reference
A program that locks two mutexes in opposite order in two threads can hang forever: each thread holds one mutex and waits for the other, and neither wait...
-
Fix LeakSanitizer "Detected Memory Leaks" — Direct vs Indirect Leaks, Traced to the Owner Sysadmin · Error Reference
LeakSanitizer ends a program with 'detected memory leaks' when heap memory is still allocated at exit and no pointer to it remains. This guide...
-
Fix Go "Undefined: ..." Compile Errors — Identifiers, Scope, and Package Qualifiers Go · Error Reference
Go prints undefined: name when a name in the code has no declaration in scope at the point where it is used, and the name after the colon is the whole...
-
Fix Go "Too Many Arguments" and "Not Enough Arguments in Call" — Call Arity, Variadic Functions, and the Spread Operator Go · Error Reference
Go counts the arguments at every call against the function's parameter list and refuses to compile when the counts differ, printing the numbers it found...
-
Fix Go "No Required Module Provides Package" — Module Resolution, Typos, Cycles, and the Replace Fix Go · Error Reference
Go refuses to build when an import names a package no module provides, printing 'no required module provides package' with the command that would...
-
Fix Go "missing return at end of function" — Return Paths, Named Results, and Branch Coverage Go · Error Reference
Go prints missing return when a function that declares result parameters can reach the end of its body without returning a value, and the position it prints...
-
Fix Go "Cannot Assign To ..." Compile Errors — Addressability, Map Values, Constants, and Call Results Go · Error Reference
Go refuses an assignment when the left-hand side has nowhere to store a value, printing 'cannot assign to' with the reason in parentheses. This...
-
Fix CMake "Generator Does Not Match" and Stale-Cache Errors When Switching Ninja and Make C++ · Error Reference
Reconfiguring an existing build tree with a different generator fails with Error: generator : Unix Makefiles Does not match the generator used previously...
-
Fix CMake "Cannot Find Source File" and "No SOURCES Given to Target" C++ · Error Reference
Configure fails with two errors — Cannot find source file: src/main.cpp, and No SOURCES given to target: app — after a source file is renamed and...
-
Reading an AddressSanitizer Heap-Use-After-Free — Fault, Freed-By, Allocated-By Sysadmin · Error Reference
An AddressSanitizer heap-use-after-free report is the only common sanitizer report with three stacks, and all three earn their place: the fault stack names...
-
Fix Go "No New Variables on Left Side of :=" — Redeclaration, Scope, and Shadowing Go · Error Reference
Go refuses a short variable declaration when every non-blank name on its left side already exists in the same scope, and it prints one sentence for the...
-
Fix Go "Declared and Not Used" and "Imported and Not Used" Compile Errors Go · Error Reference
Two Go compile errors stop a build over code that harms nothing at run time: a local variable that is declared and never read, and an import that no...
-
Fix Go "Cannot Use ... As ..." Type Errors — Assignability, Conversions, and Untyped Constants Go · Error Reference
Go assigns a value to a differently typed variable only when the language's assignability rule allows it, and every refusal arrives in one sentence...
-
Fix Go "Assignment Mismatch" and "Multiple-Value in Single-Value Context" Errors Go · Error Reference
Go functions return several values at once, and the compiler counts both sides of every assignment that receives them. This guide reproduces the two...
-
Fix "Undefined Reference to Vtable" — the Missing Virtual Function C++ · Error Reference
A class with virtual functions compiles in every file and then fails to link with a single undefined reference to the vtable for the class, naming no...
-
Fix Template "Undefined Reference" — Why Template Definitions Cannot Hide in a .cpp C++ · Error Reference
A class template declared in a header and defined in a .cpp file compiles in both files and then fails to link with undefined references to every member the...
-
Fix "Multiple Definition" Link Errors — Header Definitions and inline C++ · Error Reference
A function and a variable defined in a header included by two source files fail to link with multiple definition errors for both. This guide reads the...
-
Fix "Cannot Find -l..." — How ld Searches for Libraries, and Where the Path Is Set C++ · Error Reference
The link fails with a single line — cannot find -lgreet — even though the library file is sitting in the project. This guide reproduces that error with a...
-
Cpp Std Min Element Not Member Fix C++ · Error Reference
layout: landing explore_theme: programming analytics_page: cpp_std_min_element_not_member_fix analytics_page_view_event...
-
Cpp Std Is Sorted Not Member Fix C++ · Error Reference
layout: landing explore_theme: programming analytics_page: cpp_std_is_sorted_not_member_fix analytics_page_view_event...
-
Cpp Std Includes Not Member Fix C++ · Error Reference
layout: landing explore_theme: programming analytics_page: cpp_std_includes_not_member_fix analytics_page_view_event...