Код: Выделить всё
olej@R420:~/2022/Go/compare/fibo$ clang++ fibo_cc.cc -o fibo_cl
fibo_cc.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
^~~~~~~~~~
1 error generated.
Код: Выделить всё
olej@R420:~$ clang++ --version
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Код: Выделить всё
olej@R420:~$ g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Код: Выделить всё
olej@R420:~/2022/Go/compare/fibo$ ls /usr/include/c++/
9
Код: Выделить всё
olej@R420:~/2022/Go/compare/fibo$ clang++ -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 fibo_cc.cc -o fibo_cl
/usr/bin/ld: невозможно найти -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Но теперь ему не хватает расшаренных библиотек:
Код: Выделить всё
olej@R420:~/2022/Go/compare/fibo$ clang++ -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -L /usr/lib/gcc/x86_64-linux-gnu/9 fibo_cc.cc -o fibo_cl