how to run the .o file after make
An object file (.o
) is not executable. You want to be running ./demo_fully_homomorphic
(e.g. the file without extension). Make sure you have execute permissions (chmod a+x demo_fully_homomorphic
).
As already mentioned in several other answers, you can execute a binary file and not the object file. However, Just in case, if what you want is to display the contents of object file in readable format?
$>objdump -d object_filename.o
You can not run a .o
file. This is an object file and has to be linked into the final executable. A .o
file is usually lacking additional libraries, which are added at the linking stage.
Looking at your outoput I would assume that one of demo_fully_homomorphic
, test_fully_homomorphic
or fully_homomorphic
are the executables that you can run.
I think I am late, but the code below maybe helpful for someone, I guess.
Using cd into your folder contains the c/c++ file, then compile it.
gcc my_test.c -o my_test
Complied file will be generated. Then still in same folder. Run the command.
./my_test