in reply to Win32::Exe - Resource section creation fails

This may or may not help you. But it helped me, with an older version of Par::Packer.

This problem shows up because of a line in the myldr\Makefile.PL .That file is similar in later versions (for these lines).

line 70 my $cc = $Config{cc};

sets this location of the compiler. in my autogenerated Makefile in the same directory is

line 7 CC=C:/MinGW/bin/gcc.exe

Line 106 in myldr\Makefile.PL

} elsif ($cc =~ m/^gcc\b/i or ($cc =~ m/^cc\b/i and $gccversion)) {

As that line stands, it wants $cc to start with gcc, when it begins with C:/MinGW. So it won't find the $cc

A solution (good enough for my purposes) was

line 106:} elsif ($cc =~ m/\bgcc\b/i or ($cc =~ m/^cc\b/i and $gccversion)) {

The important line that this affects is

line 111     $res = ($^O =~ /^(?:MSWin|cygwin)/) ? 'win32.coff' : '';

since we want $res to = 'win32.coff'

In the autogenerated Makefile, this value shows up in the line for "OBJECTS =", and in the line after "$static.exe".

Without this change, the Resources Section is never created. But there may be other sources of glitches. If your compiler is not the MinGW gcc, this probably helps little.

Replies are listed 'Best First'.
Re^2: Win32::Exe - Resource section creation fails
by Dirk80 (Pilgrim) on Sep 23, 2010 at 19:21 UTC

    Thank you for your answer. I now tried exactly the same I did with Windows XP with Windows Vista. And there everything is working fine.

    Perhaps it is just a difference how the Makefile is generated. My problem is that I can't try now. I have one week of vacation and here at home I do not have a Windows XP.

    End of next week I'll compare the Makefiles I have on Windows Vista and Windows XP and then I let you know.

Re^2: Win32::Exe - Resource section creation fails
by Dirk80 (Pilgrim) on Nov 16, 2010 at 13:45 UTC

    Thank you very very much. You solved my problem.

    I'm very sorry for my late reply.

    To avoid that other people have the same problems I had: Would it make sense to always change line 106 of myldr\Makefile.PL?