in reply to Compiling with static perl510s.lib

Why can't I compile in perl510s.lib and no longer need perl510.dll

I think you'll find that perl-static.exe does *not* need perl510.dll. It's very easy to test - just rename perl510.dll to something else (eg perl510.dll_hide), and then run perl-static -V
I think you'll find that runs fine, whereas perl -V will crash because perl510.dll can't be found.

Not that I really understand how things are supposed to work, but it does look to me that things are broken. For example, I would have thought that the Win32 extension would have been built into perl-static.exe, but that's not the case, and any call to load Win32 will try to load the dynamic version (for which perl510.dll *does* need to be found). The mileage you can get out of perl-static.exe without using perl510.dll is therefore very limited, afaict.

For the record, the static build I tried was with perl-5.11.2, I used MSVC++ 7.0, and the only amendments I made to the win32/Makefile (outside of the usual amendments) was to set "BUILD_STATIC" and "ALL_STATIC" to "define".

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Compiling with static perl510s.lib
by gszczesz (Novice) on Dec 02, 2009 at 17:14 UTC

    Thanks a lot for your feedback.

    Just to clarify, I'm embeding perl in my own C application, hence why I'm trying to link to perl510s.lib.

    If the Win32 extension is not built into the static library, how hard would it be for someone like me link it staticlaly?

    Greg
      I'm embeding perl in my own C application, hence why I'm trying to link to perl510s.lib

      I don't have much experience with embedding but, normally, people just embed the dynamic perl. Is there a reason that's not a good option for you ?

      If the Win32 extension is not built into the static library, how hard would it be for someone like me link it staticlaly?

      Given that you've received no useful help on this forum, I think you'd be better off pursuing this on the p5p mailing list - where I, for one, would follow the thread with interest. (You may not even have to subscribe in order to post there ... can't remember).
      There should be someone there who understands exactly what's required. I can't even find documentation that explains (with any clarity) what we can rightly expect from perl-static.exe. All I know is that my understanding of the comments in the win32/Makefile doesn't match what I'm actually getting.

      Cheers,
      Rob
        Thanks for your help Rob, much appreciated. I'll try the news group.

        Greg