Error map

recompile with -fPIC relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

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

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). 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.

recompile with -fPIC — relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC (C/C++)recompile w…undefined reference to pthread_create — C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`) (C/C++)undefined reference…undefined reference to vtable — C++: undefined reference to `vtable for X' — virtual function not defined (C/C++)undefined reference…multiple definition of — C/C++: multiple definition of `x'; first defined here — ld returned 1 exit status (C/C++)multiple definition…ld: library not found for -lssl — macOS: ld: library 'ssl' not found / ld: library not found for -lssl (clang: error: linker command failed) (macOS)ld: library not fou…undefined reference to clock_gettime — undefined reference to `clock_gettime' / `shm_open' / `timer_create' — missing -lrt (C/C++)undefined reference…undefined reference to std::filesystem — undefined reference to `std::filesystem::...' — link stdc++fs (C/C++)undefined reference…undefined reference to typeinfo — undefined reference to `typeinfo for X' (C/C++)undefined reference…LNK2038 — MSVC: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' (C/C++)LNK2038LNK1112 — MSVC: fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64' (C/C++)LNK1112cannot find -l — /usr/bin/ld: cannot find -lssl: No such file or directory (C/C++)cannot find -lfile in wrong format — ld: file in wrong format / skipping incompatible libfoo.so when searching (C/C++)file in wrong formatundefined reference to sqrt — undefined reference to `sqrt' / `pow' / `sin' — missing -lm (C/C++)undefined reference…error while loading shared libraries — error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory (Linux)error while loading…undefined reference to — C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status (C/C++)undefined reference…undefined reference to main — C/C++: undefined reference to `main' — (.text+0x20) in crt1.o (C/C++)undefined reference…cannot declare variable to be of abstract type — C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions) (C/C++)cannot declare vari…pure virtual method called — C++: pure virtual method called — terminate called without an active exception (C/C++)pure virtual method…LNK1104 — MSVC: fatal error LNK1104: cannot open file 'foo.lib' (or 'app.exe' while it is running) (C/C++)LNK1104redefinition of — C++: error: redefinition of 'class X' / multiple definition — missing include guard (C/C++)redefinition ofincomplete 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…No Xcode or CLT — gyp: No Xcode or CLT version detected! (npm)No Xcode or CLTUndefined symbols for architecture — Undefined symbol(s) for architecture arm64 — linker command failed with exit code 1 (iOS)Undefined symbols f…built for iOS, linking for simulator — Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 (iOS)built for iOS, link…LNK2001 — MSVC: error LNK2001: unresolved external symbol / LNK1120: unresolved externals (C/C++)LNK2001LNK2005 — MSVC: error LNK2005: already defined in main.obj / LNK1169: one or more multiply defined symbols found (C/C++)LNK2005not a member of std — C++: error: 'optional' in namespace 'std' does not name a template type — wrong -std standard (C/C++)not a member of stdRead-only file system (macOS system volume) — macOS: mkdir: /data: Read-only file system / touch: /usr/bin/x: Read-only file system (macOS)Read-only file syst…UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY — /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) (Linux)UNEXPECTED INCONSIS…LNK2019 — MSVC: error LNK2019: unresolved external symbol "void __cdecl foo(void)" referenced in function main (C/C++)LNK2019C1083 — MSVC: fatal error C1083: Cannot open include file: 'foo.h': No such file or directory (C/C++)C1083C1010 — MSVC: fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "pch.h"' (C/C++)C1010undefined reference to dlopen — undefined reference to `dlopen' / `dlsym' — missing -ldl (C/C++)undefined reference…undefined reference to curl_easy_init — undefined reference to `curl_easy_init' / `SSL_new' / `EVP_...' (library not linked) (C/C++)undefined reference…not found in the pkg-config search path — Package 'glib-2.0' was not found in the pkg-config search path / configure: error: Package requirements were not met (C/C++)not found in the pk…

Directly related (12)

undefined reference to pthread_createC/C++

C/C++: undefined reference to `pthread_create' — missing -pthread (also `dlopen`, `clock_gettime`)

Your program uses threads (or another system library) but the linker was not told to link it.

undefined reference to vtableC/C++

C++: undefined reference to `vtable for X' — virtual function not defined

The linker cannot find the class's virtual table, which means at least one virtual member function was declared but never defined…

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.

ld: library not found for -lsslmacOS

macOS: ld: library 'ssl' not found / ld: library not found for -lssl (clang: error: linker command failed)

The linker can't find OpenSSL (or another library) because Homebrew libraries aren't on its search path.

undefined reference to clock_gettimeC/C++

undefined reference to `clock_gettime' / `shm_open' / `timer_create' — missing -lrt

POSIX realtime functions live in librt on older glibc.

undefined reference to std::filesystemC/C++

undefined reference to `std::filesystem::...' — link stdc++fs

GCC 8 and older need `-lstdc++fs` for ``.

undefined reference to typeinfoC/C++

undefined reference to `typeinfo for X'

A class with virtual functions has no key function defined, or RTTI settings differ.

LNK2038C/C++

MSVC: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'

Objects or libraries were built with different C runtime settings.

LNK1112C/C++

MSVC: fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'

Mixing 32-bit and 64-bit objects or libraries.

cannot find -lC/C++

/usr/bin/ld: cannot find -lssl: No such file or directory

The linker was told to link `-lfoo` but cannot find libfoo.so or libfoo.a in any search path.

file in wrong formatC/C++

ld: file in wrong format / skipping incompatible libfoo.so when searching

The linker found a library built for a different architecture or format (32-bit vs 64-bit, x86 vs ARM, ELF vs Mach-O).

undefined reference to sqrtC/C++

undefined reference to `sqrt' / `pow' / `sin' — missing -lm

The math library is not linked, so libm functions are unresolved.

Two steps away (23)

error while loading shared librariesLinux

error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory

The program needs a shared library (.so) that isn’t installed or isn’t on the loader’s search path.

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.

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.

cannot declare variable to be of abstract typeC/C++

C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions)

You tried to create an object of a class that still has pure virtual functions; only a derived class that overrides all of them c…

pure virtual method calledC/C++

C++: pure virtual method called — terminate called without an active exception

A pure virtual function was called on an object that is being constructed or destroyed, where the derived part no longer exists.

LNK1104C/C++

MSVC: fatal error LNK1104: cannot open file 'foo.lib' (or 'app.exe' while it is running)

The Visual C++ linker could not open an input library or the output file — the path is wrong, the library is missing, or the .exe…

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.

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…

No Xcode or CLTnpm

gyp: No Xcode or CLT version detected!

node-gyp on macOS can’t find the Xcode Command Line Tools to compile native modules.

Undefined symbols for architectureiOS

Undefined symbol(s) for architecture arm64 — linker command failed with exit code 1

The linker can’t find the implementation of a symbol your code uses — a missing framework/library, a file not in the target, or a…

built for iOS, linking for simulatoriOS

Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

A library contains device-only arm64 code; Apple Silicon simulators also run arm64 and need a separate simulator slice.

LNK2001C/C++

MSVC: error LNK2001: unresolved external symbol / LNK1120: unresolved externals

Same family as LNK2019 for data or non-function symbols; LNK1120 counts them.

LNK2005C/C++

MSVC: error LNK2005: already defined in main.obj / LNK1169: one or more multiply defined symbols found

The same symbol is defined in more than one translation unit.

not a member of stdC/C++

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

The standard-library feature you used needs a newer C++ standard than the compiler is currently set to.

Read-only file system (macOS system volume)macOS

macOS: mkdir: /data: Read-only file system / touch: /usr/bin/x: Read-only file system

Since Catalina the system volume is read-only and sealed; you can't create directories at `/` or modify system folders.

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLYLinux

/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)

The filesystem needs a manual check.

LNK2019C/C++

MSVC: error LNK2019: unresolved external symbol "void __cdecl foo(void)" referenced in function main

The linker found a call to a function it cannot find a definition for.

C1083C/C++

MSVC: fatal error C1083: Cannot open include file: 'foo.h': No such file or directory

The compiler cannot find a header.

C1010C/C++

MSVC: fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "pch.h"'

A source file does not start with the precompiled header include.

undefined reference to dlopenC/C++

undefined reference to `dlopen' / `dlsym' — missing -ldl

The dynamic-loading library is not linked (older glibc).

undefined reference to curl_easy_initC/C++

undefined reference to `curl_easy_init' / `SSL_new' / `EVP_...' (library not linked)

A third-party library header was included, but the library itself was never linked.

not found in the pkg-config search pathC/C++

Package 'glib-2.0' was not found in the pkg-config search path / configure: error: Package requirements were not met

pkg-config cannot find the .pc file of a dependency.