To configure on 64-bit ubuntu 14.04LTS
Install java
Install LAMP.
Install node.js
Install clang : sudo apt-get install clang
Install CS50 Library :
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
Download the following folders
- check50
- style50
- render50
Extract(if downloaded as .zip) the above folders and place them in your preferred directory.
Let's assume you placed them in ~/Desktop
.
Open your ~/.bashrc
by typing
gksudo gedit ~/.bashrc
Then add the following lines at the end of the file :
check50() { ~/Desktop/check50/bin/check50 "$@" ;}
style50() { ~/Desktop/style50/bin/style50 "$@" ;}
export CC=clang
export CFLAGS="-ggdb3 -O0 -std=c99 -Wall -Werror"
export LDLIBS="-lcs50 -lm"
save the file and close it.
Now you can use check50, style50 and make as used in the appliance.
Note :
I still haven't encountered the need for render50, you may configure it similarly if the need arises .