Chilkat C/C++ Library Downloads
for MinGW-w64 and TDM-GCC
These are the builds used by Qt on Windows (MinGW kits) and by older Code::Blocks installers. Code::Blocks 25.03 and newer bundle a GCC 14 / UCRT toolchain from WinLibs; for that, or for MSYS2, see the MSYS2 downloads (the UCRT64 build). For CLion's bundled MinGW see the CLion downloads.
The downloads on this page are the full-versions.
Chilkat libraries/components are fully functional for 30-day evaluations.
Which build do I need?
Match the GCC version of the toolchain your IDE installed (run g++ --version to check), plus the architecture (x86_64 or i686) and exception model (SEH for 64-bit, DWARF for 32-bit). Each download is labelled with the GCC version it was built with; the MinGW-w64 number in parentheses is the runtime version, which is not the same thing.
| IDE / toolchain | Compiler it ships | Chilkat download |
|---|---|---|
| Qt 6.8 – 6.11 | GCC 13.1.0 x86_64 posix seh | GCC 13.1 (MinGW-w64 11) x86_64 |
| Qt 6.2.2 – 6.7 | GCC 11.2.0 x86_64 posix seh | GCC 11.2 (MinGW-w64 9) x86_64 |
| Qt 5.15, Qt 6.0 – 6.2.1, Code::Blocks 20.03 | GCC 8.1.0 x86_64 posix sehGCC 8.1.0 i686 posix dwarf | GCC 8.1.0 x86_64 GCC 8.1.0 i686 |
| Qt 5.12 – 5.14 | GCC 7.3.0 x86_64 posix sehGCC 7.3.0 i686 posix dwarf | GCC 7.3.0 x86_64 GCC 7.3.0 i686 |
| Generic MinGW-w64 / WinLibs installs | GCC 12.2.0 / GCC 14.1.0 / GCC 15.1.0 | GCC 12.2 (MinGW-w64 10) / GCC 14.1 (MinGW-w64 12) / GCC 15.1 (MinGW-w64 13) x86_64 |
| Code::Blocks 25.03 and newer | WinLibs GCC 14.2.0, UCRT | MSYS2 UCRT64 (MSYS2 downloads page) |
| CLion (bundled MinGW) | GCC 11.2.0 x86_64 posix seh | CLion downloads or GCC 11.2 (MinGW-w64 9) x86_64 |
| Qt LLVM-MinGW kits (clang) | LLVM-MinGW 17 / 18 | Not currently provided — use an MSVC kit, or contact Chilkat |
Getting Started: Compiling and Linking
TDM-GCC Downloads
Getting Started: Compiling and Linking
1Unzip the download
Each download is a .zip; unzip it anywhere (the examples below assume C:\chilkat). There is nothing to install or register.
| libchilkat.a | The Chilkat static library. Everything is in this one file; your .exe has no Chilkat DLL dependency. |
| include/ | One header per class: CkZip.h, CkHttp.h, ... for C++, and C_CkZip.h, C_CkHttp.h, ... for C. Include only the headers for the classes you use. |
| linkSample.cpp linkSample.sh | A minimal C++ program and the g++ command that builds it (run the .sh from an MSYS2 or Git Bash shell, or copy the command into a Command Prompt). |
| c_Sample.c c_sampleBuild.sh | The same for C: compile with gcc, link with g++. |
2Write a small test program
Your application must call UnlockBundle once, at startup, each time it runs. Any string works for the 30-day trial; a purchased unlock code replaces it later without other changes.
// example.cpp
#include <iostream>
#include "include/CkGlobal.h"
#include "include/CkZip.h"
bool unlockChilkat()
{
CkGlobal glob;
if (!glob.UnlockBundle("Anything for 30-day trial")) {
std::cout << glob.lastErrorText() << std::endl;
return false;
}
return true;
}
int main()
{
if (!unlockChilkat()) return 1;
CkZip zip;
std::cout << "Chilkat version: " << zip.version() << std::endl;
return 0;
}
3Build from the command line
Link with libchilkat.a plus the three Windows system libraries Chilkat depends on: crypt32, ws2_32, and dnsapi. Always link with g++ (even for a C program) so the C++ runtime is pulled in.
# C++ program
g++ example.cpp -o example.exe -L. -lchilkat -lcrypt32 -lws2_32 -ldnsapi -Wl,--gc-sections
# C program: compile with gcc, link with g++
gcc -c c_example.c -o c_example.o
g++ c_example.o -o c_example.exe -L. -lchilkat -lcrypt32 -lws2_32 -ldnsapi -Wl,--gc-sections
Replace -L. with the directory containing libchilkat.a if it is not the current directory. -Wl,--gc-sections is optional but recommended: the Chilkat library is built with one section per function, so this lets the linker discard every Chilkat function your program does not use, which can make the .exe considerably smaller. Add -static if you don't want to ship the MinGW runtime DLLs (libstdc++-6.dll, libgcc_s_seh-1.dll, libwinpthread-1.dll) alongside your .exe.
4Or add Chilkat to your IDE project
Qt (qmake .pro file)
INCLUDEPATH += C:/chilkat
LIBS += -LC:/chilkat -lchilkat -lcrypt32 -lws2_32 -ldnsapi
QMAKE_LFLAGS += -Wl,--gc-sections
Qt 6 or Code::Blocks (CMakeLists.txt)
target_include_directories(myapp PRIVATE C:/chilkat)
target_link_directories(myapp PRIVATE C:/chilkat)
target_link_libraries(myapp PRIVATE chilkat crypt32 ws2_32 dnsapi)
target_link_options(myapp PRIVATE -Wl,--gc-sections)
Code::Blocks (classic .cbp project): open Project → Build options. Under Search directories → Compiler add the folder you unzipped to; under Linker settings → Link libraries add the full path to libchilkat.a, then crypt32, ws2_32, and dnsapi; optionally add -Wl,--gc-sections under Linker settings → Other linker options.
5If the link fails
Many "undefined reference" errors from inside libchilkat.a almost always mean the download does not match your compiler. Check the table above: the GCC version, the architecture (x86_64 vs i686), and the exception model (SEH vs DWARF) all have to agree — and go by the GCC version in the download name, not the MinGW-w64 runtime number in parentheses. In a Qt or Code::Blocks console, g++ --version and g++ -dumpmachine show what you actually have.
Errors mentioning crypt32, ws2_32, or dnsapi symbols mean those system libraries are missing from the link line, or are listed before -lchilkat; order matters with GNU ld, so keep them after it.
Unresolved C++ runtime symbols in a C program mean the final link was done with gcc instead of g++.