> >>I now have unresolved externals when linking static.exe: > >> ... > >>-out:.\static.exe static.obj : error LNK2001: unresolved > >>external symbol __imp__win32_access static.obj : error > >>LNK2001: unresolved external symbol __imp__win32_stat > > > >This is stuff from perl58.dll which shouldn't be there - static.o > >should only reference standard C library functions. I dunno the > ... > cl -E ... does the trick. The win32_* symbols are all > defined in perl's > win32/win32.c (and exported from the perl58.dll), and declared in > win32iop.h. The pre-processor output (minus the huge chunks > that load > perl58.dll and par.exe) is attached.
OK, win32iop.h redefines lseek to win32_lseek etc unless WIN32IO_IS_STDIO is defined. The latter is defined when PERL_IMPLICIT_SYS is defined. Comparing your Config.pm with that for ActiveState perl 5.8.6 I see that they have defined the latter, but you haven't. Actually PERL_IMPLICIT_SYS gets defined in perl-5.8.6/win32/Makefile when USE_IMP_SYS is defined, but I didn't figure out where this can get undefined. My guess is that this follows from your decision to build your perl without support for ithreads. That leaves two possible solutions for the original problem with PAR: (1) rebuild your perl with the same options as ActiveState does, then rebuild PAR (2) in PAR's myldr/static.c remove the following lines #include "EXTERN.h" #include "perl.h" (shouldn't be needed anyway, as static.c is supposed to depend only on standard C functions). You need to replace them with the appropriate list of #include's from the standard C library to cover all functions actually referenced in static.c. (Unfortunately that list is probably build-target specific, so this isn't a general fix.) Cheers, Roderich