Closed chenzww closed 1 year ago
To successfully link, libstd
and friends also need to be linked in.
mrustc
should have tried to call the compiler for you, is there a reason you're trying to manually compile the emitted code?
I'am a beginner in c language and clang compiler. Can you tell me a common way to pass options to gcc or clang compiler to build it?
when you ran mrustc my_rust_file.rs
the debug file created will have included the gcc
command it was trying to run (and mrustc
should have called it for you)
You should not need to manually compile the .c
file
Thanks. After I took a close look at the the file which the suffix of file name is _cmd.txt
. I finally fully understand the rule of compilation.
Environment: OS: macOS 12.6.3 command line: clang main.c
Clang Failed to build a c program which transpiled from a simple rust main file use mrustc. Error message:
However, the main.c file build and run succeed in Clion IDE.