In Cygwin add -liconv to the linker. This will load something like y:\CYGwin\lib\libiconv.a to solve the problem (to be sure, you must do a full install for Cygwin).