Skip to content

Linux Include are gone? #506

@retro-dwsz

Description

@retro-dwsz

So I usually download the ucrt windows version, and I'm good with it for years. Now I have a Linux VM, and I want to try coding C/C++ on Linux, but after I downloaded the Ubuntu version, I got this:

rdvorzak-vmware@fedora:~/Desktop/Code/CPP-CS-HybridProgramming/Test Platform$ clang++ Extern.cpp -shared -o Extern_LINUX.X64.so Extern.cpp -fPIC -std=c++23 -O3 -m64 -static
Extern.cpp:34:10: fatal error: 'cmath' file not found
   34 | #include <cmath>
      |          ^~~~~~~
1 error generated.
Extern.cpp:34:10: fatal error: 'cmath' file not found
   34 | #include <cmath>
      |          ^~~~~~~
1 error generated.
rdvorzak-vmware@fedora:~/Desktop/Code/CPP-CS-HybridProgramming/Test Platform$ clang++ Extern.cpp -shared -o Extern_LINUX.X64.so Extern.cpp -fPIC -std=c++23 -O3 -m64 -static -v
clang version 20.1.7 (https://github.com/llvm/llvm-project.git 6146a88f60492b520a36f8f8f3231e15f3cc6082)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/bin
 "/home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/bin/clang-20" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir Extern_LINUX.X64.so- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Extern.cpp -static-define -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb "-fdebug-compilation-dir=/home/rdvorzak-vmware/Desktop/Code/CPP-CS-HybridProgramming/Test Platform" -v "-fcoverage-compilation-dir=/home/rdvorzak-vmware/Desktop/Code/CPP-CS-HybridProgramming/Test Platform" -resource-dir /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20 -c-isystem /usr/include -c-isystem /usr/include/x86_64-linux-gnu -cxx-isystem /usr/include -cxx-isystem /usr/include/x86_64-linux-gnu -internal-isystem /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20/include -internal-isystem /usr/local/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=c++23 -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/Extern-fccefe.o -x c++ Extern.cpp
clang -cc1 version 20.1.7 based upon LLVM 20.1.7 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20/include
 /usr/local/include
End of search list.
Extern.cpp:34:10: fatal error: 'cmath' file not found
   34 | #include <cmath>
      |          ^~~~~~~
1 error generated.
 "/home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/bin/clang-20" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir Extern_LINUX.X64.so- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Extern.cpp -static-define -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb "-fdebug-compilation-dir=/home/rdvorzak-vmware/Desktop/Code/CPP-CS-HybridProgramming/Test Platform" -v "-fcoverage-compilation-dir=/home/rdvorzak-vmware/Desktop/Code/CPP-CS-HybridProgramming/Test Platform" -resource-dir /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20 -c-isystem /usr/include -c-isystem /usr/include/x86_64-linux-gnu -cxx-isystem /usr/include -cxx-isystem /usr/include/x86_64-linux-gnu -internal-isystem /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20/include -internal-isystem /usr/local/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=c++23 -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/Extern-728bac.o -x c++ Extern.cpp
clang -cc1 version 20.1.7 based upon LLVM 20.1.7 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /home/rdvorzak-vmware/Desktop/Code/LLVM/llvm/lib/clang/20/include
 /usr/local/include
End of search list.
Extern.cpp:34:10: fatal error: 'cmath' file not found
   34 | #include <cmath>
      |          ^~~~~~~
1 error generated.

Image

And I checked: Where's the Includes?

Image

But windows Include is good?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions