I have been trying to run a c++ program from https://github.com/rinon/Simple-Homomorphic-Encryption
As specified in the README
I have run the following commands,
make
make test
make demo
Now, I have the following files in my directory,
zakirhussain@zakirhussain-K52F:~/Simple-Homomorphic-Encryption$ ls
circuit.cpp demo_vote_counter.cpp fully_homomorphic.cpp main.o security_settings.h test_suite.o utilities.o
circuit.h demo_vote_counter.h fully_homomorphic.h makefile security_settings.o type_defs.h
circuit.o demo_vote_counter.o fully_homomorphic.o README test_fully_homomorphic utilities.c
demo_fully_homomorphic fully_homomorphic main.cpp security_settings.cpp test_suite.cpp utilities.h
Could someone help me with running demo_vote_counter.o
file?
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 ).
The best way to open an O file is to simply double-click it and let the default assoisated application open the file. If you are unable to open the file this way, it may be because you do not have the correct application associated with the extension to view or edit the O file.
.o denote "object-files", these are files compiled from source but not yet linked into an executable or a library. In your make-file, i.e. main.o : main.cpp. says that main.o will be created from main.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With