Faroe - 2013-06-16


I'm using Debian wheezy and I've been trying to cross-compile a screen saver for Windows. The linker complains about missing symbols such as _WinMain@16 and _DefScreenSaverProc@16. These should exist inside libscrnsave.a so that linking is possible with -lscrnsave, but that file is practically empty; its size is 672 bytes.

I downloaded the MinGW-w64 source tarball version 2.0.8 and noticed that it contains the source file for libscrnsave.a (at least that's what I think it is): the path in the tarball is mingw-w64-v2.0.8/mingw-w64-crt/libsrc/scrnsave.c. I also noticed that the entire contents of the file have been wrapped inside #if 0 ... #endif so it is basically an empty file. Obviously, that would explain why no symbols end up in libscrnsave.a.

Can someone tell me why the code in scrnsave.c has been commented out? I can copy the file to my project, uncomment it, and it seems to work fine. Sorry if I'm not getting things right here; this is my first stab at cross-compiling.

Thanks in advance.