Error map

not a member of std C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard

C/C++ · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

not a member of std — C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard (C/C++)not a membe…was not declared in this scope — C++: error: 'x' was not declared in this scope (undeclared identifier) (C/C++)was not declared in…fatal error: No such file or directory — C/C++: fatal error: foo.h: No such file or directory — #include not found (C/C++)fatal error: No suc…redefinition of — C++: error: redefinition of 'class X' / multiple definition — missing include guard (C/C++)redefinition ofdoes not name a type — C++: error: 'string' does not name a type (C/C++)does not name a typeNo rule to make target — Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop. (C/C++)No rule to make tar…missing separator — Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab) (C/C++)missing separatorCould not find a package configuration file — CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2) (C/C++)Could not find a pa…undefined reference to — C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status (C/C++)undefined reference…expected ';' before — C/C++: error: expected ';' before 'x' — missing semicolon (C/C++)expected ';' beforeexpected primary-expression before — C++: error: expected primary-expression before ')' token (C/C++)expected primary-ex…command not found — bash: command not found (Linux)command not foundundefined reference to main — C/C++: undefined reference to `main' — (.text+0x20) in crt1.o (C/C++)undefined reference…incomplete type — C++: error: invalid use of incomplete type 'class X' — forward declaration only (C/C++)incomplete typeimplicit declaration of function — C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration] (C/C++)implicit declaratio…multiple definition of — C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status (C/C++)multiple definition…declared and not used — Go: declared and not used: x / "fmt" imported and not used (Go)declared and not us…E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308invalid conversion from — C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] (C/C++)invalid conversion …

Directly related (7)

was not declared in this scopeC/C++

C++: error: 'x' was not declared in this scope (undeclared identifier)

The compiler met a name it has never seen: it is misspelled, declared later, out of scope, or its header or namespace is missing.

fatal error: No such file or directoryC/C++

C/C++: fatal error: foo.h: No such file or directory — #include not found

The preprocessor cannot find a header named in `#include`: wrong path, missing include directory (-I), or the library is not inst…

redefinition ofC/C++

C++: error: redefinition of 'class X' / multiple definition — missing include guard

The same class, struct or function body was included twice in one translation unit because the header has no include guard.

does not name a typeC/C++

C++: error: 'string' does not name a type

Where the compiler expected a type, it found a name it does not know as one — a missing header, namespace, or class declared late…

No rule to make targetC/C++

Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop.

`make` was asked to build a file for which there is no rule and no existing file — a missing source, a typo in the Makefile, or a…

missing separatorC/C++

Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab)

A line in the Makefile is neither a rule, a variable assignment nor a tab-indented command — nearly always spaces used where a TA…

Could not find a package configuration fileC/C++

CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2)

`find_package(Foo)` could not locate the library's CMake config (FooConfig.cmake or FindFoo.cmake), so the library is not install…

Two steps away (11)

undefined reference toC/C++

C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status

The linker can’t find the definition of a function or variable that was declared and used.

expected ';' beforeC/C++

C/C++: error: expected ';' before 'x' — missing semicolon

The compiler reached a token where a statement should have ended — almost always a missing semicolon on the line above.

expected primary-expression beforeC/C++

C++: error: expected primary-expression before ')' token

The parser expected a value or expression and found a token that cannot start one — often a type name passed where a value belong…

command not foundLinux

bash: command not found

The shell can’t find an executable with that name in any directory on your PATH.

undefined reference to mainC/C++

C/C++: undefined reference to `main' — (.text+0x20) in crt1.o

The linker has no `main` function: the file with `main` is not compiled or linked, or `main` is spelled or declared incorrectly.

incomplete typeC/C++

C++: error: invalid use of incomplete type 'class X' — forward declaration only

You used a class that has only been forward-declared (so its size and members are unknown) where the full definition is required.

implicit declaration of functionC/C++

C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration]

In C you called a function the compiler has not seen declared — usually a missing `#include`. Newer compilers treat it as an erro…

multiple definition ofC/C++

C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status

The linker found the same function or global variable defined in two object files — usually something defined in a header.

declared and not usedGo

Go: declared and not used: x / "fmt" imported and not used

Go refuses to compile code with unused local variables or unused imports.

E0308Rust

Rust: error[E0308]: mismatched types — expected `X`, found `Y`

A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…

invalid conversion fromC/C++

C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

C++ forbids silently dropping `const` or converting between unrelated pointer types — typically a string literal assigned to `cha…