http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900
--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-19 11:34:52 UTC --- I can reproduce with x86_64-w64-mingw32-gcc-4.6.2 on cygwin. Adding 'extern' to the declaration in the .h file fixes it.