Does wxprec.h exist? It should be in the include/wx folder.
The post subject says "wx3.1.7", but all the build log refers to wxWidgets-3.1.6
You also have the following option in the command line:
-IC:\wxWidgets-3.1.6\incude\wx)
It is not needed and has a typo error (incude) and an stray bracket, so it will not work anyway. Have you modified the general compiler settings?