Adding a folder to PATH is usually not suitable for me. Try this command instead. I just compiled an example with it without errors:
g++ timer_ex.cpp ..\dlib\all\source.cpp -I.. -luser32 -lws2_32 -lgdi32 -lcomctl32 -limm32
cryptic -I.. include. , , . - , .
, , -O3, gcc . , , .
, CMake. , . Windows, Linux, Mac OS . dlib, cmake . , make. visual studio, , cmake .