Chilkat C++ over CBridge
the Chilkat C++ API for every C++ compiler, from one shared library per platform
Windows 64-bit, 32-bit, and Arm64 · Linux x86_64, x86, arm (armv7l), and arm64 · Alpine Linux x86_64 and arm64 · macOS universal (Intel and Apple Silicon).
Chilkat C++ over CBridge is the Chilkat C++ API — the same classes and the same header files as the
Chilkat C/C++ libraries — implemented by a small layer of C++ source that you
compile with your own compiler. That layer forwards every call to the Chilkat C bridge shared library
(chilkat_c_bridge_x64.dll, libchilkat_c_bridge_x86_64.so,
libchilkat_c_bridge.dylib, …). Because the library has a plain C interface, one library per
platform works with every compiler and C++ runtime: any Visual C++ version, MinGW-w64, C++Builder, and
any GCC or Clang on Linux, Alpine, and macOS. Existing Chilkat C++ programs compile unchanged.
Download
This is the full-version Chilkat product. Chilkat libraries are fully functional for a 30-day evaluation; no separate trial build is required. One download covers Windows, Linux, Alpine, and macOS.
The 60-second version
- Unzip the download to
C:\chilkat-cpp-bridge(or~/chilkat-cpp-bridge). - Add
includeandsrcto your include path, and addsrc/ChilkatCppBridgeAll.cppto your project. - Link the library for your platform (e.g.
lib\windows-x64\chilkat_c_bridge_x64.lib), copy the matching shared library next to your executable, and build.
Documentation & Samples
- 📖 Chilkat C++ Reference Documentation — the API is identical
- 💻 Chilkat C++ Sample Code — every example works unchanged
- 📝 Release Notes on the Chilkat blog
What's in the download
| File / folder | Description |
|---|---|
include/ | The Chilkat C++ headers (CkHttp.h, CkHttpW.h, …),
identical to the headers of the Chilkat C/C++ libraries. |
src/ | The wrapper sources: one .cpp per class plus a small runtime.
ChilkatCppBridgeAll.cpp includes all of them, so a single file is enough. Portable C++98: no STL,
exceptions, or RTTI required, no configuration macros. |
lib/windows-x64/lib/windows-x86/lib/windows-arm64/ |
chilkat_c_bridge_x64.dll, chilkat_c_bridge_win32.dll (32-bit, cdecl), and
chilkat_c_bridge_arm64.dll, each with its import library (.lib). Code-signed. |
lib/linux-x86_64/ … lib/linux-arm64/ | libchilkat_c_bridge_<arch>.so
for x86_64, x86, arm (armv7l hard-float), and arm64. Requires glibc 2.27 or newer. |
lib/alpine-x86_64/lib/alpine-arm64/ | The same for Alpine Linux (musl). |
lib/macos/ | libchilkat_c_bridge.dylib: one universal (arm64 + x86_64) library,
code-signed, install name @rpath/libchilkat_c_bridge.dylib. |
examples/quickstart.cpp | A complete program: unlock, AES-encrypt and decrypt a string. |
README.md | Build instructions for every toolchain and the notes below. |
license.pdf | The full EULA license agreement. |
Building
Compile either src/ChilkatCppBridgeAll.cpp alone, or every src/*.cpp except
ChilkatCppBridgeAll.cpp (not both), with include and src on the include path.
The commands below are run from the chilkat-cpp-bridge directory.
Visual C++
cl /EHsc /I include /I src examples\quickstart.cpp src\ChilkatCppBridgeAll.cpp lib\windows-x64\chilkat_c_bridge_x64.lib copy lib\windows-x64\chilkat_c_bridge_x64.dll .
For 32-bit builds use lib\windows-x86\chilkat_c_bridge_win32.lib; for ARM64,
lib\windows-arm64\chilkat_c_bridge_arm64.lib.
MinGW-w64
g++ -I include -I src examples/quickstart.cpp src/ChilkatCppBridgeAll.cpp lib/windows-x64/chilkat_c_bridge_x64.dll -o quickstart.exe
MinGW links the DLL directly; no import library is needed.
C++Builder
| Compiler | Import library |
|---|---|
bcc64x (Win64 Modern) | link lib\windows-x64\chilkat_c_bridge_x64.lib directly |
bcc32c, bcc32 (Win32) | implib -a -c chilkat_c_bridge_win32_omf.lib lib\windows-x86\chilkat_c_bridge_win32.dll |
bcc64 (Win64 classic Clang) | mkexp chilkat_c_bridge_x64.a lib\windows-x64\chilkat_c_bridge_x64.dll |
Linux and Alpine Linux
g++ -I include -I src examples/quickstart.cpp src/ChilkatCppBridgeAll.cpp \
-Llib/linux-x86_64 -lchilkat_c_bridge_x86_64 -Wl,-rpath,'$ORIGIN' -o quickstart
cp lib/linux-x86_64/libchilkat_c_bridge_x86_64.so .
On Alpine, use lib/alpine-x86_64 or lib/alpine-arm64.
macOS
clang++ -I include -I src examples/quickstart.cpp src/ChilkatCppBridgeAll.cpp \
-Llib/macos -lchilkat_c_bridge -Wl,-rpath,@executable_path -o quickstart
cp lib/macos/libchilkat_c_bridge.dylib .
In an application bundle, put the dylib in MyApp.app/Contents/Frameworks/ and link with
-Wl,-rpath,@executable_path/../Frameworks.
Important notes
<windows.h> before any Chilkat header (if you include it at all).
Chilkat's FileTime.h and SystemTime.h define FILETIME and
SYSTEMTIME themselves when <windows.h> has not been included yet.
- Use
src/andlib/from the same download. With a library from another Chilkat version no Chilkat object is created, andlastErrorText()says why. - Events: the
CkBaseProgresscallbacksAbortCheck,PercentDone,ProgressInfo, andTaskCompletedare delivered. Class-specific progress callbacks (CkZipProgress,CkMailManProgress,CkHttpProgress, …) are not called. - Asynchronous methods:
TaskCompletedmay arrive afterCkTask::Wait()returns. - The wide-character classes (
CkHttpW, …) are included;CkRegistryandCkServiceare not. - Do not mix the wrapper and a Chilkat C++ static library in the same program.
Deploying your application
The Chilkat shared library is the only runtime dependency. Ship the one file for your platform, normally in the same directory as your executable; nothing is installed or registered.
Next Steps
Browse the C++ examples for working code covering HTTP/REST, JSON, XML, email, FTP, SFTP/SSH, Zip, PDF, digital signatures, encryption, and much more. For questions, see the reference documentation or contact Chilkat support.
"C++Builder" is a registered trademark of Embarcadero Technologies.