Всем привет. Решил попробовать программирование на Си. Компиляция работает странно. Ругается на то что не хватает каких-то библиотек. При этом в терминале VS Code программа отрабатывает как надо. Норма ли это?
Код программы:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
Консоль отладки в VS Code:
=thread-group-added,id="i1"
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
Breakpoint 1, main () at /home/me/git/c/hello_world/main.c:5
5 {
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
[Inferior 1 (process 39951) exited normally]
The program '/home/me/git/c/hello_world/main' has exited with code 0 (0x00000000).
Терминал в VS Code:
Hello world!
[1] + Done "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-vbdszetz.bm1" 1>"/tmp/Microsoft-MIEngine-Out-2u2ycua3.n1v"
Файл /lib64/ld-linux-x86-64.so.2 существует. Он является ссылкой на /lib/x86_64-linux-gnu/ld-2.31.so
me@mint:~/git/c/hello_world$ file /lib64/ld-linux-x86-64.so.2
/lib64/ld-linux-x86-64.so.2: symbolic link to /lib/x86_64-linux-gnu/ld-2.31.so
me@mint:~/git/c/hello_world$ file /lib/x86_64-linux-gnu/ld-2.31.so
/lib/x86_64-linux-gnu/ld-2.31.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=4587364908de169dec62ffa538170118c1c3a078, stripped