Installing the Chilkat Perl Module on Windows
The quickest way to add the Chilkat module to a Windows Perl installation is the one-line installer. The manual procedure below it is for machines without internet access, or if you prefer to install from a downloaded package.
Install with one command
The install-perl script reads your Perl's version and architecture from the
perl that runs it, downloads the matching prebuilt module, and copies chilkat.pm
and chilkat.dll into that perl's site library. No gmake,
dmake, or compiler is involved, and because the perl that runs the script is the
perl the module goes into, the version always matches. In PowerShell or a Command Prompt:
curl.exe -fsSL https://chilkatdownload.com/perl/install-perl | perl -
Write curl.exe, not curl: in PowerShell, curl is an
alias for Invoke-WebRequest. curl.exe is included with Windows 10
and later. Equivalently, download the script first and run it:
curl.exe -fsSLo install-perl https://chilkatdownload.com/perl/install-perl perl install-perl
site\lib, which is writable by you for a
normal C:\Strawberry install. If Strawberry lives somewhere protected (for example
under C:\Program Files), the script says it cannot write there: either re-run from
an Administrator PowerShell, or add --local to install under your user profile.
cpanm --mirror https://chilkatdownload.com/cpan --mirror-only ChilkatIt fetches the same prebuilt package at configure time and installs it through MakeMaker, so cpanm is included with Strawberry Perl;
cpanm --uninstall Chilkat removes it. A specific release can be installed from its URL,
cpanm https://chilkatdownload.com/cpan/authors/id/C/CH/CHILKAT/Chilkat-<version>.tar.gz.
Other options: --dry-run shows what would be detected and installed without changing
anything; --from <file> installs from an already-downloaded
.zip (offline machines); --version 11.6.0 selects a particular
Chilkat release. The script finishes by loading the module in a fresh perl and printing the
Chilkat version, so OK: 'use chilkat' loads means you are done.
Manual install from a downloaded package
For machines without internet access, or if you prefer to download the package yourself.
(With the package downloaded, perl install-perl --from chilkat-perl-<version>-x86_64-mingw32.zip
also works in place of step 4.)
- The module is prebuilt.
chilkat.dllis already compiled, so the build step just copieschilkat.pmandchilkat.dllinto your Perl'ssite/lib— there is no C compiler step for Chilkat itself. - Match the Perl version exactly. A module built for one Perl version
(e.g. 5.40) will not load under a different one (e.g. 5.38). The major.minor
must match what
perl -versionreports; a patch-level difference (5.40.x) is fine. - Use the same Perl to install and to run. If several Perls are installed, build
and install with the same
perlyou'll run your scripts with — whichever is first on yourPATH. - Import is lowercase:
use chilkat;(notChilkat). - Use Strawberry Perl. This is a MinGW build, and the runtime DLLs
chilkat.dlldepends on are supplied by Strawberry Perl.
-
Download
Get the Windows build from the Chilkat Windows Perl Downloads. The download is a
.zipfor 64-bit (x86_64) Perl. -
What's in the download
Unzip the archive to any directory. It contains:
chilkat-perl-<version>-x86_64-mingw32/ ├─ lib/ │ ├─ chilkat.dll the compiled Chilkat module │ └─ chilkat.pm the Perl module ├─ Makefile.PL build script (ExtUtils::MakeMaker) ├─ MANIFEST ├─ META.yml ├─ test.pl a short test / unlock example ├─ license.pdf ├─ pcre2-license.pdf └─ quickjs-license.pdf
-
Verify your Perl version and architecture
The download must match your installed Perl version (5.30, 5.32, …, 5.42) and be 64-bit. Check with:
perl -version
-
Build and install
In the unzipped directory, from a Command Prompt or PowerShell window, run:
perl Makefile.PL gmake gmake install
Recent Strawberry Perl includes
gmake. On older Strawberry (5.24 and earlier) the build tool isdmakeinstead:perl Makefile.PL dmake dmake install
-
Verify the installation
Run the included
test.pl, or this short script, which unlocks Chilkat in 30-day trial mode and prints the version:use chilkat(); my $glob = new chilkat::CkGlobal(); my $success = $glob->UnlockBundle("Anything for 30-day trial"); if ($success != 1) { print $glob->lastErrorText() . "\n"; exit; } print "Version: " . $glob->version() . "\n";
If it prints the Chilkat version, the module is installed correctly.
Troubleshooting
“gmake” (or “dmake”) is not recognized
This only concerns the manual procedure — the one-line installer needs no build
tool at all. Otherwise, the build tool isn't on your PATH. The simplest fix:
- Download a portable Strawberry Perl
.zipfrom strawberryperl.com/releases.html and unzip it to any directory (for exampleC:\Perl\strawberry-perl-portable). - Add both the
c\binandperl\bindirectories to your WindowsPATHenvironment variable — for exampleC:\Perl\strawberry-perl-portable\c\binandC:\Perl\strawberry-perl-portable\perl\bin. - Open a new Command Prompt so it picks up the updated
PATH. The build tool (gmake, ordmakeon older Strawberry) should now be available.
“Can't load chilkat.dll” or a version/bootstrap mismatch
The module was built for a different Perl version. Download the build whose version
matches perl -version (the major.minor must match; a 5.40.x patch difference
is fine).
Bitness mismatch
A 64-bit Perl cannot load a 32-bit module, or vice-versa. The current download is 64-bit, so your Perl must be 64-bit as well.
“The specified module could not be found” when loading chilkat.dll
A runtime dependency is missing — usually because the script isn't running under
Strawberry Perl, which supplies the MinGW runtime DLLs that chilkat.dll
needs. Use a Strawberry Perl installation.
“Permission denied” during gmake install
The installer can't write to Perl's site/lib. This happens when Perl is
in a protected location such as C:\Program Files. Run the Command Prompt
as Administrator, or use a portable Strawberry Perl in a writable directory.
“Can't locate chilkat.pm in @INC”
The module was installed into a different Perl than the one running your script. Build,
install, and run with the same perl — check which one is first on your
PATH.