I've compiled successfully this tool without source code edits using Cygwin:
http://eadmaster.altervista.org/pub/prj/builds/lg-tv-command-win32.zip
It seems to work correctly, except it cannot initialize the connection: i
always have to connect with putty first, then i can send commands with
lg-remote-control...