Fix compilation errors under GCC
Add CMakeLists.txt
Add .gitignore
Merge pull request #1 from Zeg9/master

Fixes and add CMakeLists