Installing the Chilkat Perl Module on Windows
Step-by-step instructions for adding the Chilkat module to a Windows Perl installation.
- 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.18, 5.20, …, 5.40) 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
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.