install - CS50 library in C -
i new ubuntu , new c programming. watching cs50 videos understand better c , cs together. tried install using these guidelines:
debian, ubuntu
first become root, with:
sudo su -
then install cs50 library follows:
apt-get install gcc wget http://mirror.cs50.net/library50/c/library50-c-5.zip unzip library50-c-5.zip rm -f library50-c-5.zip cd library50-c-5 gcc -c -ggdb -std=c99 cs50.c -o cs50.o ar rcs libcs50.a cs50.o chmod 0644 cs50.h libcs50.a mkdir -p /usr/local/include chmod 0755 /usr/local/include mv -f cs50.h /usr/local/include mkdir -p /usr/local/lib chmod 0755 /usr/local/lib mv -f libcs50.a /usr/local/lib cd .. rm -rf library50-c-5
i used it, , think went planned, try run gcc demo.c
fatal error message:
adder.c:2:18: fatal error: cs50.h: no such file or directory #include <cs50.h>
so seems somewhere went wrong , don't know how fix it. guide me little bit how fix or how reinstall c automatically include library?
check in /usr/local/include directory cs50.h file
if not there, 1 or more of shell commands failed (or skipped).
have tried running gcc
compile/link demo.c
file via:
gcc -c -wall -wextra -pedantic -wconversion -std=gnu99 demo.c -o demo.o -i/usr/local/include gcc demo.o -o demo -l/usr/local/lib -lcs50
if not sure above 2 lines do, ask.
Comments
Post a Comment