It might be unrelated to mixing C and C++ code together, but the problem doesn't seem to have a clear answer.
I run into this error when running GDB:
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Inferior 1 (process 1663) exited normally]