Summarizing the problem as generally as possible:
I used to compile the program via terminal with the sequence of commands even in bash. Basically: