ritwik12 / Virtual-Assistant

A linux based Virtual assistant on Artificial Intelligence in C
GNU General Public License v3.0
125 stars 96 forks source link

Create makefile #99

Closed hardikpnsp closed 3 years ago

hardikpnsp commented 3 years ago

Created a simple make file to build and compile Virtual-Assistant

Build:

Changes:

closes: #73

hardikpnsp commented 3 years ago

Please test it and let me know if everything is working or not. Also, as we have a makefile, we might want to make changes in the compile section of README.md and maybe The CI pipeline too? I am not sure.

ritwik12 commented 3 years ago

@hardikpnsp Thanks for sending PR, MakeFile works fine and does what you said. It is nice to have a Build directory separately. But I am unable to find an Executable after running make. Can you please tell me how can I do so?

Yes, we need to update Readme.md and CI Pipeline too. If you can do please go ahead.

hardikpnsp commented 3 years ago

The executable: ./build/virtual_assistant

Sure, I will update Readme. Will also take a look at the CI.

ritwik12 commented 3 years ago

That is giving me segmentation fault @hardikpnsp

hardikpnsp commented 3 years ago

That is giving me segmentation fault @hardikpnsp

Oh, are you getting it right at the start? or at some particular point? for me, it works... can you try make clean and run it agian? also, what os are you using?

hardikpnsp commented 3 years ago

in the end, the make command will execute the following commands in order to build

mkdir -p build
gcc -c -o build/main.o main.c -std=gnu11 -Isrc -Iutils
gcc -c -o build/init_config.o src/init_config.c -std=gnu11 -Isrc -Iutils
gcc -o build/virtual_assistant build/main.o build/init_config.o -std=gnu11 -Isrc -Iutils -lssl -lcrypto -ljson-c `pkg-config --libs libcurl`

can the error be because of missing --cflags in the pkg-config at the end?

ritwik12 commented 3 years ago

@hardikpnsp I think that has to do something with my certs in my system, sometimes this issue is there with librcurl in RHEL. Can you please check if your's is working fine for the restaurant feature?

Try: "find places to eat" And enter a location name like city when it asks for that.

ritwik12 commented 3 years ago

@hardikpnsp Thanks for this contribution!!

ritwik12 commented 3 years ago

@hardikpnsp Added you to the credits also for this.

ritwik12 commented 3 years ago

@all-contributors please add @hardikpnsp for code

allcontributors[bot] commented 3 years ago

@ritwik12

I've put up a pull request to add @hardikpnsp! :tada: