Closed chudur-budur closed 6 months ago
You have a linker in the environment already:
ld_impl_linux-64 2.40 h55db66e_0 conda-forge
What you're missing is the correct include path for the C++ standard library, which clang
doesn't have by default. However, if you use clangxx
as your invocation, this should work. This is modeled after how gcc
is the C compiler and gxx
is the C++ compiler.
However, if you use
clangxx
as your invocation, this should work.
But there is no executable called clangxx
, you mean clang-17
?
I tried with clang-17
but getting the same linker error.
Sorry, I misremembered, the executable (provided by the package clangxx
) is called clang++
.
It's working now. Thanks @h-vetinari Closing.
Solution to issue cannot be found in the documentation.
Issue
I need to use
clang-17
for a project, but I don't have administrative permission to the machine that I am working on. So I am using anaconda environment for this purpose. I also needpython3.11
.I have created a conda environment like this:
Then installed
clang-17
throughconda
,clangxx_linux-64
:It seems like
clang
is working, we can verify:Now, let's take a simple
c++
code:But when I try to compile, I get this linker error:
It looks like I need to install a
conda
package that provides a linker.How do I fix this?
Installed packages
Environment info