C:\Users\mdsne\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2\cores\esp8266/core_esp8266_main.cpp:175: undefined reference to `loop'
Every Arduino sketch must have a setup and a loop function. Even if you don't want to put any code in the functions, you still need to define them. Your sketch doesn't have a loop function, thus the error.
I updated the sketch with the loop segment and now have this error message when I try to compile.
C:\Users\mdsne\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506/bin/xtensa-lx106-elf-ar: unable to rename 'C:\Users\mdsne\AppData\Local\Temp\arduino_build_455618\libraries\ESP8266WiFi\ESP8266WiFi.a'; reason: File exists
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\mdsne\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2\libraries\ESP8266WiFi
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\mdsne\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.