gdb: (No debugging symbols found in ./app)
gdb can load the program but there is no debug information, so it cannot show source lines or variable names.
No debugging symbols found(No debugging symbols found ingdb no debugging symbolsno debug info Meaning
Debug info is added by compiling with -g. Release builds, -s (strip) or build systems that default to -O2 without -g leave only machine addresses.
Common causes
- Compiled without
-g - Binary stripped
- CMake
CMAKE_BUILD_TYPE=Release - Debug symbols in a separate
.debugfile not installed
⚡ Quick fix
- Rebuild with
-g -O0(orRelWithDebInfo) - Install the
-dbgsym/ debuginfo package - Do not run
stripon binaries you want to debug
Detailed fix by platform
GCC
g++ -g -O0 main.cpp -o app
CMake
cmake -DCMAKE_BUILD_TYPE=Debug ..
How to diagnose
- Flag — -g used?
- Strip — Binary stripped?
- Type — Build type?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- call of overloaded is ambiguous C++: error: call of overloaded 'f(int)' is ambiguous
- cannot declare variable to be of abstract type C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions)
- ptrace Operation not permitted gdb: ptrace: Operation not permitted. / Could not attach to process
Most viewed in C/C++
- Bus error C/C++: Bus error (core dumped) — SIGBUS from misaligned access or a bad memory-mapped file
- AddressSanitizer: heap-buffer-overflow C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N
- AddressSanitizer: heap-use-after-free C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 2 Dec 2026