Questions tagged [carbon-lang]
Carbon is an experimental programming language. It is a successor for C++, and is designed around interoperability with C++. It allows for large-scale adoption and migration of existing C++ codebases and developers.
5
questions
4
votes
1
answer
415
views
Why is clang/llvm throwing me this error using Bazel while building carbon
So I am trying to build carbon-lang i have done everything, installed clang/llvm it works fine but when I run the command bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
it gives ...
0
votes
0
answers
195
views
error while loading shared libraries: libstd-69edc9ac8de4d39c.so
I am building a docker container for compiling a mix of rust, carbon and c.
Everything seems to work until running main.carbon and call the function of my rust library. Although the import seems valid....
0
votes
1
answer
196
views
How to print more than one value in the same line?
A simple example
Print("This is a number {0}", 1) // results in 4
How can I print 1 2 3 in the same line?
I have tried
Print(1, 2, 3) // Does not work
The forloop also does not work.
The ...
3
votes
1
answer
149
views
How to perform pointer arithmetic?
I'm new to the Carbon language, how to perform pointer arithmetic? Is this even possible?
p = p + 1;
=>
COMPILATION ERROR: <source>:11: type error in `+`:
could not find implementation of ...
3
votes
1
answer
315
views
Slices vs Arrays in Carbon language
What are the differences between Array and Slice in Carbon? I find a document from the official repo. However, it is uncompleted currently.
The following are example codes from the Carbon official ...