I compile my c code with gcc and it creates an obj code but when I tried to run it it gives cannot execute binary file error how can I solve this problem can you help me?
gcc -c virtualAddressManager.c -o vam ./vam.exe cannot execute binary file
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Why are you creating an object file? If you want to create an executable, you shouldn't use the
Additionally, where did you get the
vam.exe from? With the command you issued, you will get an output file called
vam without the
.exe part. You aren't working on Windows, are you?
To get an executable and run it, you should do
gcc virtualAddressManager.c -o vam chmod +x vam ./vam