Just a simple hello_world
program may work on my host machine but in virtualbox for both Windows 7 and 10, it fails to execute.
This is the source code:
fn main()
{
println!("Hello, world!");
}
I compiled it via this command cargo build --release
. I copied the file and pasted in both Windows 7 and 10 and I get the exact same messages:
I made a simple C equivalent program, compiled it using gcc
via this command gcc learning.c -o learning.exe
and it worked just fine on both Windows 7 and Windows 10 on VM.
here is the source code for C:
#include <stdio.h>
int main()
{
printf("Hello world");
}
How would I compile without needing such dependencies or something to avoid getting such errors?