modified to work on windows eclipse with MinGW.