During compilation it is complaining perl510.lib is missing
The problem is that, with mingw-built perls, the needed import lib (which is to be found in perl/lib/CORE) is named libperl510.a, not perl510.lib.
You need to use your VS 2008 to create "libperl510.a" directly from the "perl510.dll" that you have located.
The following is modified from https://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file. (Refer to that link first if something doesn't work. Its title is a little misleading as no header file is needed.)
Firstly, run:
dumpbin /EXPORTS perl510.dll > perl510.exports
Paste the names of the functions from perl510.exports into a new file named perl510.def. Add a line with the word EXPORTS at the top of this file.
Then, assuming that your VC environment has been properly set up (by running vcvars32.bat or whatever it is), you run:
lib /def:perl510.def /out:perl510.lib
You should get two files generated: perl510.lib and perl510.exp .
You then need to place perl510.lib somewhere where it's found - probably in perl/lib/CORE (ie in the same place as libperl510.a).
I know this procedure can work, as I've done it before. But it's something I haven't done for a long time, and I'm a bit hazy on the details.
See how you go, and report back if you get stuck.
UPDATE 1: I gave it a go using VC++ 7.0 and Strawberry Perl-5.12.2.
Seemed to go ok.
With perl510.exports, I first removed the short section of stuff at the beginning that comes before the listing of the functions begins.
And I also removed the short "Summary" section at the end.
To generate perl510.def I then ran:
perl -le "open RD, 'perl510.exports'; while (<RD>) { print (split /\s+
+/, $_)[4] }" >perl510.def
And then I manually added the EXPORTS line at the top of the file.
When I ran the lib command, I got:
C:\expt>lib /def:perl510.def /out:perl510.lib
Microsoft (R) Library Manager Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
LIB : warning LNK4068: /MACHINE not specified; defaulting to X86
Creating library perl510.lib and object perl510.exp
That all seems OK.
UPDATE 2: A simpler way to create the def file is to use gendef, which ships with later versions of Strawberry Perl.
Just create perl510.def by running:
gendef perl510.dll
Then, as before, run:
lib /def:perl510.def /out:perl510.lib
Cheers, Rob | [reply] [d/l] [select] |
You got more problems than just a missing .lib file. Perl 5.10 is out of support since 2009-08-23. Visual Studio 2008 is out of support since 2018-04-10. Both programs had, in newer version, major security updates since then.
That pretty much guarantees that both your development environment and any software you make with your tools will have major security problems.
I think it is time to upgrade.
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
| [reply] [d/l] |
| [reply] |