me:~/src/slash-a/slash$ make
g++ -c -O3 -Wall -I../lib main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:37:11: error: ‘exit’ was not declared in this scope
main.cpp:45:11: error: ‘exit’ was not declared in this scope
main.cpp:85:11: error: ‘exit’ was not declared in this scope
me:~/src/slash-a/slash$ make g++ -c -O3 -Wall -I../lib main.cpp main.cpp: In function ‘int main(int, char**)’: main.cpp:37:11: error: ‘exit’ was not declared in this scope main.cpp:45:11: error: ‘exit’ was not declared in this scope main.cpp:85:11: error: ‘exit’ was not declared in this scope
If I change 'exit(1)' to 'return 1' it's fine I think it's im stdlib.h, but might work without it on some setups: http://stackoverflow.com/questions/5277560/is-exit-function-declared-anywhere-else-besides-stdlib-h