You dont have libperl51*.a in your library search path. Your Config.pm file is probably broken or from a different perl version. You said you installed "over", thats a disaster. XS libraries can only be used within the same minor (middle number) version. You can NOT under any circumstance use a XS module compiled with 5.12 on 5.14 or a XS module compiled with 5.14 on 5.12 Perl. Or a 5.12 XS module with a 5.10 or 5.16 Perl. You can use an XS module compiled with Perl 5.12.3 with Perl 5.12.1 at runtime or any other permutation aslong as the first and 2nd numbers match. The last number can change, but Perl guarantees ABI between maintenance releases.
# Tried to use 'Moose::Autobox'.
# Error: Can't load 'C:/strawberry/perl/lib/auto/autobox/autobox.
+dll' for module autobox: load_file:%1 is not a valid Win32 applicatio
+n at C:/strawberry/perl/lib/XSLoader.pm line 68.
means the Windows DLL loader couldn't load the DLL, one reason is an unresolved function import. It probably couldn't find its parent perl dll or the parent perl dll didn't export a function this XS DLL wants.
Cross GCC version ABI and which GCC MakeMaker uses I dont know enough to answer.
You will atleast have to delete Config.pm, the CORE folder, all .lib/.a files, and all .dll files, and /bin (where perl.exe is), in your perl installation if you want to install over, and delete /lib and /vendor for safety. /site is the only folder you can keep (but make sure no .dlls are inside), even this can cause problems sometimes (a newer dual life was installed in /site than original perl /lib has, then you install a newer perl, that has a newer dual life in /lib than in /site, but Perl will load the older than stock dual life from /site since /site has precedence over /lib). All XS modules have to be recompiled, no exceptions. Pure perl, extremely unlikely, (I've never heard of a CPAN module that does Perl code generation or .pm renaming at build/install time based on Perl version).